[FFmpeg-devel] [PATCH 20/41] avformat/smush: use ff_alloc_extradata()
Paul B Mahol
onemda at gmail.com
Sun Oct 13 14:48:41 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/smush.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavformat/smush.c b/libavformat/smush.c
index 9c8997c..e9c1937 100644
--- a/libavformat/smush.c
+++ b/libavformat/smush.c
@@ -145,11 +145,9 @@ static int smush_read_header(AVFormatContext *ctx)
avpriv_set_pts_info(vst, 64, 66667, 1000000);
if (!smush->version) {
- vst->codec->extradata = av_malloc(1024 + 2 + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!vst->codec->extradata)
+ if (ff_alloc_extradata(vst->codec, 1024 + 2))
return AVERROR(ENOMEM);
- vst->codec->extradata_size = 1024 + 2;
AV_WL16(vst->codec->extradata, subversion);
for (i = 0; i < 256; i++)
AV_WL32(vst->codec->extradata + 2 + i * 4, palette[i]);
--
1.7.11.2
More information about the ffmpeg-devel
mailing list