summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Zern <jzern-at-google.com@ffmpeg.org>2016-10-14 00:33:50 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2016-10-14 17:02:33 +0200
commit7f7c494a3340f71046dde62aa1939128600854a4 (patch)
treee32466665981effc50f364912197f402c663005b
parent56706ac0d5723cb549fec2602e798ab1bf6004cd (diff)
downloadffmpeg-streaming-7f7c494a3340f71046dde62aa1939128600854a4.zip
ffmpeg-streaming-7f7c494a3340f71046dde62aa1939128600854a4.tar.gz
ffmpeg_cleanup: fix crash with unrecognized codec
since: 3e5e5bd Merge commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc' Signed-off-by: James Zern <jzern@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 693981f..af8ed76 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -533,7 +533,7 @@ static void ffmpeg_cleanup(int ret)
avcodec_free_context(&ost->enc_ctx);
avcodec_parameters_free(&ost->ref_par);
- while (av_fifo_size(ost->muxing_queue)) {
+ while (ost->muxing_queue && av_fifo_size(ost->muxing_queue)) {
AVPacket pkt;
av_fifo_generic_read(ost->muxing_queue, &pkt, sizeof(pkt), NULL);
av_packet_unref(&pkt);
OpenPOWER on IntegriCloud