Commit 7f7c494a authored by James Zern's avatar James Zern Committed by Michael Niedermayer

ffmpeg_cleanup: fix crash with unrecognized codec

since:
3e5e5bdf Merge commit '398f015f'
Signed-off-by: 's avatarJames Zern <jzern@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 56706ac0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment