fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t

Reported-by: Andreas Rheinhardt
This commit is contained in:
Anton Khirnov 2024-02-03 20:59:07 +01:00
parent 71ea90638e
commit 931192226b
1 changed files with 2 additions and 2 deletions

View File

@ -300,6 +300,7 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt,
av_packet_unref(pkt); av_packet_unref(pkt);
pkt = NULL; pkt = NULL;
ret = 0; ret = 0;
*stream_eof = 1;
} else if (ret < 0) } else if (ret < 0)
goto fail; goto fail;
} }
@ -352,14 +353,13 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt,
goto mux_fail; goto mux_fail;
} }
*stream_eof = 1; *stream_eof = 1;
return AVERROR_EOF;
} else { } else {
ret = sync_queue_process(mux, ms, pkt, stream_eof); ret = sync_queue_process(mux, ms, pkt, stream_eof);
if (ret < 0) if (ret < 0)
goto mux_fail; goto mux_fail;
} }
return 0; return *stream_eof ? AVERROR_EOF : 0;
mux_fail: mux_fail:
err_msg = "submitting a packet to the muxer"; err_msg = "submitting a packet to the muxer";