diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-13 10:30:59 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-13 20:13:38 +0000 |
commit | a807c68253b02cce8b9fbc87d7857c31d531a1ee (patch) | |
tree | e4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/rtpdec_svq3.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) | |
download | ffmpeg-a807c68253b02cce8b9fbc87d7857c31d531a1ee.tar.gz |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_svq3.c')
-rw-r--r-- | libavformat/rtpdec_svq3.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/rtpdec_svq3.c b/libavformat/rtpdec_svq3.c index 106b7857cb..98e8b58673 100644 --- a/libavformat/rtpdec_svq3.c +++ b/libavformat/rtpdec_svq3.c @@ -28,6 +28,7 @@ #include <string.h> #include "libavutil/intreadwrite.h" +#include "internal.h" #include "rtp.h" #include "rtpdec.h" #include "rtpdec_formats.h" @@ -60,11 +61,9 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, av_freep(&st->codec->extradata); st->codec->extradata_size = 0; - if (len < 2 || !(st->codec->extradata = - av_malloc(len + 8 + FF_INPUT_BUFFER_PADDING_SIZE))) + if (len < 2 || ff_alloc_extradata(st->codec, len + 8)) return AVERROR_INVALIDDATA; - st->codec->extradata_size = len + 8; memcpy(st->codec->extradata, "SEQH", 4); AV_WB32(st->codec->extradata + 4, len); memcpy(st->codec->extradata + 8, buf, len); |