[FFmpeg-cvslog] r18001 - trunk/libavformat/mov.c

Aurelien Jacobs aurel
Mon Mar 16 13:42:53 CET 2009


On Mon, Mar 16, 2009 at 07:43:39AM +0100, bcoudurier wrote:
> Author: bcoudurier
> Date: Mon Mar 16 07:43:38 2009
> New Revision: 18001
> 
> Log:
> fix trkn metadata parsing
> 
> Modified:
>    trunk/libavformat/mov.c
> 
> Modified: trunk/libavformat/mov.c
> ==============================================================================
> --- trunk/libavformat/mov.c	Mon Mar 16 07:06:05 2009	(r18000)
> +++ trunk/libavformat/mov.c	Mon Mar 16 07:43:38 2009	(r18001)
> @@ -79,6 +79,19 @@ typedef struct MOVParseTableEntry {
>  
>  static const MOVParseTableEntry mov_default_parse_table[];
>  
> +static int mov_metadata_trkn(MOVContext *c, ByteIOContext *pb, unsigned len)
> +{
> +    char buf[16];
> +
> +    get_be16(pb); // unknown
> +    snprintf(buf, sizeof(buf), "%d", get_be16(pb));
> +    av_metadata_set(&c->fc->metadata, "track", buf);
> +
> +    get_be16(pb); // total tracks

According to the comment, it seems like mov contains the total track number.
Just FYI, files with id3v2 tags generally export track in the following form:
  track="08/12"
with 08 being the track number, and 12 the total track number.
I guess the mov demuxer could do the same.

Aurel




More information about the ffmpeg-cvslog mailing list