diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-13 14:30:59 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-14 00:13:38 +0400 |
commit | a807c68253b02cce8b9fbc87d7857c31d531a1ee (patch) | |
tree | e4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/sbgdec.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/sbgdec.c')
-rw-r--r-- | libavformat/sbgdec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index 30c3b49cd7..36cd8a3ce2 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -1333,11 +1333,9 @@ static int encode_intervals(struct sbg_script *s, AVCodecContext *avc, if (edata_size < 0) return AVERROR(ENOMEM); } - edata = av_malloc(edata_size); - if (!edata) + if (ff_alloc_extradata(avc, edata_size)) return AVERROR(ENOMEM); - avc->extradata = edata; - avc->extradata_size = edata_size; + edata = avc->extradata; #define ADD_EDATA32(v) do { AV_WL32(edata, (v)); edata += 4; } while(0) #define ADD_EDATA64(v) do { AV_WL64(edata, (v)); edata += 8; } while(0) |