Commit 88909bec authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/movenc: move chapter_properties under the #if of the code that uses it

Fixes warning about unused variable
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f55a7ba0
...@@ -3378,8 +3378,6 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum) ...@@ -3378,8 +3378,6 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
MOVTrack *track = &mov->tracks[tracknum]; MOVTrack *track = &mov->tracks[tracknum];
AVPacket pkt = { .stream_index = tracknum, .flags = AV_PKT_FLAG_KEY }; AVPacket pkt = { .stream_index = tracknum, .flags = AV_PKT_FLAG_KEY };
int i, len; int i, len;
// 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->mode = mov->mode; track->mode = mov->mode;
track->tag = MKTAG('t','e','x','t'); track->tag = MKTAG('t','e','x','t');
...@@ -3387,6 +3385,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum) ...@@ -3387,6 +3385,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
track->enc = avcodec_alloc_context3(NULL); track->enc = avcodec_alloc_context3(NULL);
track->enc->codec_type = AVMEDIA_TYPE_SUBTITLE; track->enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
#if 0 #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)); track->enc->extradata = av_malloc(sizeof(chapter_properties));
if (track->enc->extradata == NULL) if (track->enc->extradata == NULL)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
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