Commit 1d4476d5 authored by James Almer's avatar James Almer Committed by Michael Niedermayer

movenc: use ff_alloc_extradata()

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 00408f95
...@@ -3507,10 +3507,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum) ...@@ -3507,10 +3507,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
#if 0 #if 0
// These properties are required to make QT recognize the chapter track // These properties are required to make QT recognize the chapter track
uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, }; uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, };
track->enc->extradata = av_malloc(sizeof(chapter_properties)); if (ff_alloc_extradata(track->enc, sizeof(chapter_properties)))
if (track->enc->extradata == NULL)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
track->enc->extradata_size = sizeof(chapter_properties);
memcpy(track->enc->extradata, chapter_properties, sizeof(chapter_properties)); memcpy(track->enc->extradata, chapter_properties, sizeof(chapter_properties));
#else #else
if (avio_open_dyn_buf(&pb) >= 0) { if (avio_open_dyn_buf(&pb) >= 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment