diff mbox series

[FFmpeg-devel,19/23] fftools/ffmpeg: stop explicitly closing output streams on input EOF

Message ID 20230531145453.20994-19-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/23] fftools/ffmpeg_enc: move nb_frames{dup, drop} globals into OutputStream | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 31, 2023, 2:54 p.m. UTC
Sending an empty packet already does that implicitly.
---
 fftools/ffmpeg.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Michael Niedermayer May 31, 2023, 9:15 p.m. UTC | #1
On Wed, May 31, 2023 at 04:54:49PM +0200, Anton Khirnov wrote:
> Sending an empty packet already does that implicitly.
> ---
>  fftools/ffmpeg.c | 1 -
>  1 file changed, 1 deletion(-)

seems to infinite loop this:

ffmpeg -y -threads:a 1 -i /home/michael/tickets//1208/702121h264-TTA.mkvtest82.mkv -bitexact -vn 1208.mkv

file seems here: ffmpeg-bugs/trac/ticket1208/702121h264-TTA.mkvtest82.mkv

thx

[...]
Anton Khirnov June 3, 2023, 8:09 p.m. UTC | #2
Quoting Michael Niedermayer (2023-05-31 23:15:47)
> On Wed, May 31, 2023 at 04:54:49PM +0200, Anton Khirnov wrote:
> > Sending an empty packet already does that implicitly.
> > ---
> >  fftools/ffmpeg.c | 1 -
> >  1 file changed, 1 deletion(-)
> 
> seems to infinite loop this:
> 
> ffmpeg -y -threads:a 1 -i /home/michael/tickets//1208/702121h264-TTA.mkvtest82.mkv -bitexact -vn 1208.mkv
> 
> file seems here: ffmpeg-bugs/trac/ticket1208/702121h264-TTA.mkvtest82.mkv

ok, I'm dropping this patch from the set (it will probably reappear
later in some form).
I've also submited a test that would catch this.

Let me know if there are any other problems with this set.

Thanks,
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 7d2a25f2bf..462365ed02 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1104,7 +1104,6 @@  static int process_input(int file_index)
             for (int oidx = 0; oidx < ist->nb_outputs; oidx++) {
                 OutputStream *ost = ist->outputs[oidx];
                 OutputFile    *of = output_files[ost->file_index];
-                close_output_stream(ost);
                 of_output_packet(of, ost->pkt, ost, 1);
             }
         }