[FFmpeg-cvslog] avcodec/movenc: move chapter_properties under the #if of the code that uses it
Alexander Strasser
eclipse7 at gmx.net
Sun Aug 25 00:24:57 CEST 2013
Hi Michael!
On 2013-08-24 23:28 +0200, Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 24 23:23:00 2013 +0200| [88909beca39ee651f9c2a049f5ea6d7b5a788e82] | committer: Michael Niedermayer
>
> 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 at gmx.at>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88909beca39ee651f9c2a049f5ea6d7b5a788e82
> ---
>
> libavformat/movenc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index f65c2bd..a46e8f8 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);
Can probably be neglected: this mixes declarations and statements...
...under "#if 0". I think at the last discussion of this we agreed that
it is OK for conditionally compiled debugging code.
I don't have knowledge about mov muxing but the code there looks a bit
out of shape, because the comment sounds like it is something essential
which it seems not to be to the current code as it doesn't use that data
at all.
So I guess all is fine. Will send this email anyway, maybe someone looks
into it and cleans the code up.
Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20130825/65e3db98/attachment.asc>
More information about the ffmpeg-cvslog
mailing list