diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-04-01 10:03:46 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-07-23 11:53:19 +0200 |
commit | 52bc8a842e037214e1644f61962982c73a175eca (patch) | |
tree | 567f5458a8f7327f0b3fb9829fad63b2e1a21b76 /fftools/ffmpeg_mux.c | |
parent | ff593c6c882791451199e3accd80304bcb8f0413 (diff) | |
download | ffmpeg-52bc8a842e037214e1644f61962982c73a175eca.tar.gz |
fftools/ffmpeg_mux: return errors from of_submit_packet()
Do not call exit_program(), as that would conflict with moving this code
into a separate thread.
Diffstat (limited to 'fftools/ffmpeg_mux.c')
-rw-r--r-- | fftools/ffmpeg_mux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index c44ff0f1df..490e0e54eb 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -232,7 +232,7 @@ static void submit_packet(OutputFile *of, OutputStream *ost, AVPacket *pkt) } } -void of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) +int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost) { int ret; @@ -243,9 +243,11 @@ void of_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; } static int print_sdp(void) |