mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 05:50:43 +00:00
Merge commit 'c3e58f8fb75d8467161a65b85eb88281547ebab1'
* commit 'c3e58f8fb75d8467161a65b85eb88281547ebab1': matroskaenc: restore compatibility with non referenced AVPacket Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a620c8321e
@ -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;
|
||||
mkv->cur_audio_pkt.buf = av_buffer_ref(pkt->buf);
|
||||
ret = mkv->cur_audio_pkt.buf ? 0 : AVERROR(ENOMEM);
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user