mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
parent
56706ac0d5
commit
7f7c494a33
2
ffmpeg.c
2
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);
|
||||
|
Loading…
Reference in New Issue
Block a user