[FFmpeg-cvslog] ffmpeg_cleanup: fix crash with unrecognized codec
James Zern
git at videolan.org
Fri Oct 14 18:03:00 EEST 2016
ffmpeg | branch: master | James Zern <jzern-at-google.com at ffmpeg.org> | Fri Oct 14 00:33:50 2016 -0700| [7f7c494a3340f71046dde62aa1939128600854a4] | committer: Michael Niedermayer
ffmpeg_cleanup: fix crash with unrecognized codec
since:
3e5e5bd Merge commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc'
Signed-off-by: James Zern <jzern at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f7c494a3340f71046dde62aa1939128600854a4
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list