Menu

#20 Unnecessary fatal error

open-later
general (27)
5
2005-11-04
2005-11-02
Anonymous
No

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.

Discussion

  • Todd Kirby

    Todd Kirby - 2005-11-04

    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.

     
  • Todd Kirby

    Todd Kirby - 2005-11-04
    • labels: --> general
    • assigned_to: nobody --> tkirby
    • status: open --> open-later
     
  • Michael Dwyer

    Michael Dwyer - 2009-09-03

    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;
    }

     
  • Michael Dwyer

    Michael Dwyer - 2009-09-07

    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>

     
  • Konstantin Pelepelin

    Thanks for a patch!

    Please, fix it in trunk.

     

Log in to post a comment.