Commit a620c832 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c3e58f8f'

* commit 'c3e58f8f':
  matroskaenc: restore compatibility with non referenced AVPacket
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents af5f9c08 c3e58f8f
......@@ -1418,8 +1418,11 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
// keyframe's timecode is contained in the same cluster for WebM
if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
mkv->cur_audio_pkt = *pkt;
if (pkt->buf) {
mkv->cur_audio_pkt.buf = av_buffer_ref(pkt->buf);
ret = mkv->cur_audio_pkt.buf ? 0 : AVERROR(ENOMEM);
} else
ret = av_dup_packet(&mkv->cur_audio_pkt);
} else
ret = mkv_write_packet_internal(s, pkt);
return ret;
......
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