[FFmpeg-devel] Question on the “decode_failed” logic in ffmpeg.c:

Steven Liu lingjiujianke at gmail.com
Thu Jul 13 17:12:15 EEST 2017


2017-07-13 21:37 GMT+08:00 Steven Liu <lingjiujianke at gmail.com>:
> 2017-07-13 20:10 GMT+08:00 Geek.Song <ffmpeg at gmail.com>:
>> On Wed, Jul 12, 2017 at 1:50 PM, Steven Liu <lingjiujianke at gmail.com> wrote:
>>> 2017-07-12 12:32 GMT+08:00 Geek.Song <ffmpeg at gmail.com>:
>>>> In ffmpeg.c:
>>>> //
>>>> // @ static int process_input_packet(InputStream *ist, const AVPacket
>>>> *pkt, int no_eof)
>>>> //
>>>>  if (ret < 0) {
>>>>             if (decode_failed) {
>>>>                 av_log(NULL, AV_LOG_ERROR, "Error while decoding
>>>> stream #%d:%d: %s\n",
>>>>                        ist->file_index, ist->st->index, av_err2str(ret));
>>>>             } else {
>>>>                 av_log(NULL, AV_LOG_FATAL, "Error while processing the decoded "
>>>>                        "data for stream #%d:%d\n", ist->file_index,
>>>> ist->st->index);
>>>>             }
>>>>             if (!decode_failed || exit_on_error)
>>>>                 exit_program(1);
>>>>             break;
>>>> }
>>>>
>>>>
>>>> why is:
>>>> if (!decode_failed || exit_on_error)
>>>>     exit_program(1);
>>>>
>>>> I think it should be:
>>> If it should be :if (decode_failed || exit_on_error)
>>> maybe only if (exit_on_error) than that, isn't it?
>>
>> NO.
>>
>> They are not identical.
>
> alright, if the error is fetal error, it should exit, but if it not
> fetal error, i not must exit :)

sorry for my mistake,

s/fetal/fatal/g

>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list