Message ID | 20240203203950.20254-1-anton@khirnov.net |
---|---|
State | Accepted |
Commit | 931192226b757103883cdd5c8a256c09b2372e09 |
Headers | show |
Series | [FFmpeg-devel,1/2] fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index ab86abee14..962d0b2882 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -300,6 +300,7 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, av_packet_unref(pkt); pkt = NULL; ret = 0; + *stream_eof = 1; } else if (ret < 0) goto fail; } @@ -352,14 +353,13 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, goto mux_fail; } *stream_eof = 1; - return AVERROR_EOF; } else { ret = sync_queue_process(mux, ms, pkt, stream_eof); if (ret < 0) goto mux_fail; } - return 0; + return *stream_eof ? AVERROR_EOF : 0; mux_fail: err_msg = "submitting a packet to the muxer";