summaryrefslogtreecommitdiff
path: root/libavformat/bink.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-10-13 10:30:59 +0000
committerPaul B Mahol <onemda@gmail.com>2013-10-13 20:13:38 +0000
commita807c68253b02cce8b9fbc87d7857c31d531a1ee (patch)
treee4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/bink.c
parent3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff)
downloadffmpeg-a807c68253b02cce8b9fbc87d7857c31d531a1ee.tar.gz
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/bink.c')
-rw-r--r--libavformat/bink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/bink.c b/libavformat/bink.c
index 887f70a512..6db73cce3a 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -116,10 +116,8 @@ static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = AV_CODEC_ID_BINKVIDEO;
- vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!vst->codec->extradata)
+ if (ff_alloc_extradata(vst->codec, 4))
return AVERROR(ENOMEM);
- vst->codec->extradata_size = 4;
avio_read(pb, vst->codec->extradata, 4);
bink->num_audio_tracks = avio_rl32(pb);
@@ -152,10 +150,8 @@ static int read_header(AVFormatContext *s)
ast->codec->channels = 1;
ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
}
- ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!ast->codec->extradata)
+ if (ff_alloc_extradata(ast->codec, 4))
return AVERROR(ENOMEM);
- ast->codec->extradata_size = 4;
AV_WL32(ast->codec->extradata, vst->codec->codec_tag);
}