[SCM] libav/experimental: yop: only set extradata size after it has been successfully allocated
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Aug 10 16:03:11 UTC 2014
The following commit has been merged in the experimental branch:
commit ab3fdaa7131e2fd8e33006daea25a282724c01f0
Author: Anton Khirnov <anton at khirnov.net>
Date: Sat May 3 10:48:03 2014 +0200
yop: only set extradata size after it has been successfully allocated
Do not leave a non-zero extradata_size set on failure
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 8caeb07..ea3175e 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -62,13 +62,12 @@ static int yop_read_header(AVFormatContext *s)
video_stream = avformat_new_stream(s, NULL);
// Extra data that will be passed to the decoder
- video_stream->codec->extradata_size = 8;
- video_stream->codec->extradata = av_mallocz(video_stream->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ video_stream->codec->extradata = av_mallocz(8 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!video_stream->codec->extradata)
return AVERROR(ENOMEM);
+ video_stream->codec->extradata_size = 8;
// Audio
audio_dec = audio_stream->codec;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list