From 88909beca39ee651f9c2a049f5ea6d7b5a788e82 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sat, 24 Aug 2013 23:23:00 +0200
Subject: [PATCH] avcodec/movenc: move chapter_properties under the #if of the
 code that uses it

Fixes warning about unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavformat/movenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index f65c2bd3cb5..a46e8f888da 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3378,8 +3378,6 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
     MOVTrack *track = &mov->tracks[tracknum];
     AVPacket pkt = { .stream_index = tracknum, .flags = AV_PKT_FLAG_KEY };
     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->tag = MKTAG('t','e','x','t');
@@ -3387,6 +3385,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
     track->enc = avcodec_alloc_context3(NULL);
     track->enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
 #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)
         return AVERROR(ENOMEM);
-- 
GitLab