mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
fftools/ffmpeg_dec: return error codes from dec_packet() instead of aborting
This commit is contained in:
parent
e0f4259689
commit
518b49a735
@ -814,8 +814,11 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
|
||||
int eof_reached = 0;
|
||||
int duration_exceeded;
|
||||
|
||||
if (ist->decoding_needed)
|
||||
if (ist->decoding_needed) {
|
||||
ret = dec_packet(ist, pkt, no_eof);
|
||||
if (ret < 0 && ret != AVERROR_EOF)
|
||||
return ret;
|
||||
}
|
||||
if (ret == AVERROR_EOF || (!pkt && !ist->decoding_needed))
|
||||
eof_reached = 1;
|
||||
|
||||
|
@ -816,7 +816,7 @@ finish:
|
||||
}
|
||||
// non-EOF errors here are all fatal
|
||||
if (ret < 0 && ret != AVERROR_EOF)
|
||||
report_and_exit(ret);
|
||||
return ret;
|
||||
|
||||
// signal EOF to our downstreams
|
||||
if (ist->dec->type == AVMEDIA_TYPE_SUBTITLE)
|
||||
@ -825,7 +825,7 @@ finish:
|
||||
ret = send_filter_eof(ist);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Error marking filters as finished\n");
|
||||
exit_program(1);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user