When accessing a movie file the program does not
recognize it issues a fatal error: Fatal Error: Could not
find decoder
It should issue false or -1 or something. It should be up
to the application developer whether it is worth exiting
the program immediately or not.
Logged In: YES
user_id=31420
This has been changed to a warning in newer versions.
false or -1 would not tell the developer what happened.
Prepend the command with '@' to ignore the error.
There are still places in the code that need to be converted
from error to warning. I'll leave this bug open as a
reminder that I need to update those as well.
This problem still exists. Should do a find/replace E_ERROR with E_WARNING. The return of null is ok but more documentation should be written to tell people what the expected returns are and what they should be if it fails.
See: http://groups.google.com/group/ffmpeg-php/browse_thread/thread/34157512a38d3f1e/0c01c319cfd05c10?lnk=gst&q=errors#0c01c319cfd05c10 for one that causes wmav3 files to die.
Here is a small patch that fixes the problem for me. I'm currently starting to use this module for a major project, I would be happy to commit any fixes that I find if you could give me commit access. Thanks for all your hard work, this module is making my life a million times easier!
---------------------------------
Index: ffmpeg_movie.c
--- ffmpeg_movie.c (revision 677)
+++ ffmpeg_movie.c (working copy)
@@ -503,7 +503,7 @@
codec_id));
if (!decoder) {
- zend_error(E_ERROR, "Could not find decoder for %s",
+ zend_error(E_WARNING, "Could not find decoder for %s",
_php_get_filename(ffmovie_ctx));
return NULL;
}
Spaces were removed in my last post. Is there anyway I can attach this as a file?
<code>
Index: ffmpeg_movie.c
===================================================================
--- ffmpeg_movie.c (revision 677)
+++ ffmpeg_movie.c (working copy)
@@ -503,7 +503,7 @@
codec_id));
if (!decoder) {
- zend_error(E_ERROR, "Could not find decoder for %s",
+ zend_error(E_WARNING, "Could not find decoder for %s",
_php_get_filename(ffmovie_ctx));
return NULL;
}
</code>
Thanks for a patch!
Please, fix it in trunk.