[FFmpeg-cvslog] r9318 - trunk/libavformat/asf.c

benoit subversion
Fri Jun 15 11:10:19 CEST 2007


Author: benoit
Date: Fri Jun 15 11:10:19 2007
New Revision: 9318

Log:
Add support for track numbers when they are set via strings
patch by Patrice Bensoussan: patrice bensoussan free fr


Modified:
   trunk/libavformat/asf.c

Modified: trunk/libavformat/asf.c
==============================================================================
--- trunk/libavformat/asf.c	(original)
+++ trunk/libavformat/asf.c	Fri Jun 15 11:10:19 2007
@@ -389,6 +389,16 @@ static int asf_read_header(AVFormatConte
                         {
                                 if     (!strcmp(name,"WM/AlbumTitle")) get_str16_nolen(pb, value_len, s->album, sizeof(s->album));
                                 else if(!strcmp(name,"WM/Genre"     )) get_str16_nolen(pb, value_len, s->genre, sizeof(s->genre));
+                                else if(!strcmp(name,"WM/Track")) {
+                                    char track[8];
+                                    get_str16_nolen(pb, value_len, track, sizeof(track));
+                                    s->track = strtol(track, NULL, 10) + 1;
+                                }
+                                else if(!strcmp(name,"WM/TrackNumber")) {
+                                    char track[8];
+                                    get_str16_nolen(pb, value_len, track, sizeof(track));
+                                    s->track = strtol(track, NULL, 10);
+                                }
                                 else url_fskip(pb, value_len);
                         }
                         if ((value_type >= 2) && (value_type <= 5)) // boolean or DWORD or QWORD or WORD




More information about the ffmpeg-cvslog mailing list