Commit a2836656 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'e46a6fb7'

* commit 'e46a6fb7':
  avconv: Check that muxing_queue exists before reading from it

Mostly noop. This was fixed in FFmpeg in 7f7c494a.

The merge makes the cosmetics match but does not include the weird
av_log().
Merged-by: 's avatarClément Bœsch <cboesch@gopro.com>
parents 67e2ba36 e46a6fb7
......@@ -555,12 +555,14 @@ static void ffmpeg_cleanup(int ret)
avcodec_free_context(&ost->enc_ctx);
avcodec_parameters_free(&ost->ref_par);
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);
if (ost->muxing_queue) {
while (av_fifo_size(ost->muxing_queue)) {
AVPacket pkt;
av_fifo_generic_read(ost->muxing_queue, &pkt, sizeof(pkt), NULL);
av_packet_unref(&pkt);
}
av_fifo_freep(&ost->muxing_queue);
}
av_fifo_freep(&ost->muxing_queue);
av_freep(&output_streams[i]);
}
......
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