diff options
author | Patrice Bensoussan <patrice.bensoussan@free.fr> | 2007-06-15 09:10:19 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2007-06-15 09:10:19 +0000 |
commit | 629272d86f8c4dcfd6c38b9000bb6872f0a229a3 (patch) | |
tree | c9c1a83224833dcbc52407462b2d515665786627 /libavformat/asf.c | |
parent | fbb578e90d2c02c125703f7b739a86bc9462034f (diff) | |
download | ffmpeg-streaming-629272d86f8c4dcfd6c38b9000bb6872f0a229a3.zip ffmpeg-streaming-629272d86f8c4dcfd6c38b9000bb6872f0a229a3.tar.gz |
Add support for track numbers when they are set via strings
patch by Patrice Bensoussan: patrice bensoussan free fr
Originally committed as revision 9318 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 2236519..b37bc4c 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -389,6 +389,16 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) { 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 |