--- fftools/ffmpeg_mux.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 3ea7636380..69af2c8d46 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -253,7 +253,7 @@ static void write_packet(OutputFile *of, OutputStream *ost, AVPacket *pkt) } } -static void submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) +static int submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) { int ret; @@ -264,9 +264,11 @@ static void submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) ret = queue_packet(of, ost, pkt); if (ret < 0) { av_packet_unref(pkt); - exit_program(1); + return ret; } } + + return 0; } int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof) @@ -290,10 +292,12 @@ int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof) else if (ret < 0) return ret; - submit_packet(of, pkt, output_streams[of->ost_index + ret]); + ret = submit_packet(of, pkt, output_streams[of->ost_index + ret]); + if (ret < 0) + return ret; } } else if (!eof) - submit_packet(of, pkt, ost); + return submit_packet(of, pkt, ost); return 0; } -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".