1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

movenc: use ff_alloc_extradata()

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
James Almer 2013-10-13 20:02:28 -03:00 committed by Michael Niedermayer
parent 00408f95e7
commit 1d4476d5da

View File

@ -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) {