You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
fftools/ffmpeg: move a block to a more appropriate place
New placement requires fewer explicit conditions and is easier to understand. The logic should be exactly equivalent, since this is the only place where eof_reached is set for decoding.
This commit is contained in:
@@ -1393,6 +1393,16 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == AVERROR_EOF) {
|
if (ret == AVERROR_EOF) {
|
||||||
|
/* after flushing, send an EOF on all the filter inputs attached to the stream */
|
||||||
|
/* except when looping we need to flush but not to send an EOF */
|
||||||
|
if (!no_eof) {
|
||||||
|
ret = send_filter_eof(ist);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(NULL, AV_LOG_FATAL, "Error marking filters as finished\n");
|
||||||
|
exit_program(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
eof_reached = 1;
|
eof_reached = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1416,16 +1426,6 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
|
|||||||
repeating = 1;
|
repeating = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* after flushing, send an EOF on all the filter inputs attached to the stream */
|
|
||||||
/* except when looping we need to flush but not to send an EOF */
|
|
||||||
if (!pkt && ist->decoding_needed && eof_reached && !no_eof) {
|
|
||||||
int ret = send_filter_eof(ist);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_FATAL, "Error marking filters as finished\n");
|
|
||||||
exit_program(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pkt && !ist->decoding_needed)
|
if (!pkt && !ist->decoding_needed)
|
||||||
eof_reached = 1;
|
eof_reached = 1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user