You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
matroskaenc: restore compatibility with non referenced AVPacket
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Anton Khirnov
parent
95d5246454
commit
c3e58f8fb7
@@ -1298,8 +1298,11 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
// keyframe's timecode is contained in the same cluster for WebM
|
// keyframe's timecode is contained in the same cluster for WebM
|
||||||
if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||||
mkv->cur_audio_pkt = *pkt;
|
mkv->cur_audio_pkt = *pkt;
|
||||||
mkv->cur_audio_pkt.buf = av_buffer_ref(pkt->buf);
|
if (pkt->buf) {
|
||||||
ret = mkv->cur_audio_pkt.buf ? 0 : AVERROR(ENOMEM);
|
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
|
} else
|
||||||
ret = mkv_write_packet_internal(s, pkt);
|
ret = mkv_write_packet_internal(s, pkt);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user