Skip to content

Commit 1c3703a

Browse files
committed
fftools/ffmpeg: Signal EOF in streamcopy
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
1 parent a9bf656 commit 1c3703a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fftools/ffmpeg.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,6 +2746,9 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
27462746
do_streamcopy(ist, ost, pkt);
27472747
}
27482748

2749+
if (!pkt && !ist->decoding_needed)
2750+
eof_reached = 1;
2751+
27492752
return !eof_reached;
27502753
}
27512754

@@ -4309,11 +4312,10 @@ static int process_input(int file_index)
43094312

43104313
for (i = 0; i < ifile->nb_streams; i++) {
43114314
ist = input_streams[ifile->ist_index + i];
4312-
if (ist->decoding_needed) {
4313-
ret = process_input_packet(ist, NULL, 0);
4314-
if (ret>0)
4315-
return 0;
4316-
}
4315+
ret = process_input_packet(ist, NULL, 0);
4316+
4317+
if (ret>0)
4318+
return 0;
43174319

43184320
/* mark all outputs that don't go through lavfi as finished */
43194321
for (j = 0; j < nb_output_streams; j++) {

0 commit comments

Comments
 (0)