From: James Almer Date: Sun, 13 Oct 2013 23:02:28 +0000 (-0300) Subject: movenc: use ff_alloc_extradata() X-Git-Tag: android-x86-4.4-r1~614 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1d4476d5dab1dd347f6870d6c5537dced8516986;p=android-x86%2Fexternal-ffmpeg.git movenc: use ff_alloc_extradata() Signed-off-by: James Almer Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 60c028eeb2..329676247b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3507,10 +3507,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum) #if 0 // These properties are required to make QT recognize the chapter track uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, }; - track->enc->extradata = av_malloc(sizeof(chapter_properties)); - if (track->enc->extradata == NULL) + if (ff_alloc_extradata(track->enc, sizeof(chapter_properties))) return AVERROR(ENOMEM); - track->enc->extradata_size = sizeof(chapter_properties); memcpy(track->enc->extradata, chapter_properties, sizeof(chapter_properties)); #else if (avio_open_dyn_buf(&pb) >= 0) {