diff options
author | Patrice Bensoussan <patrice.bensoussan@free.fr> | 2007-09-09 17:54:26 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-09-09 17:54:26 +0000 |
commit | 6ec14b333df2703708225f4db3d1aa02b27ad2a0 (patch) | |
tree | fe6ff393739f8b564a08f1e4a04e3cf423ac5b9e /libavformat/asf.c | |
parent | dbd6a1fee8a7aa132858061c88e2bfa7b4321a20 (diff) | |
download | ffmpeg-6ec14b333df2703708225f4db3d1aa02b27ad2a0.tar.gz |
Improve track number decoding for some WMA files
patch by Patrice Bensoussan %patrice P bensoussan A free P fr%
Original thread:
Date: Sep 9, 2007 12:33 PM
Subject: [FFmpeg-devel] [PATCH] Improve track number decoding for some WMA files
Originally committed as revision 10462 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 9cebd4c3da..6491c0f331 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -390,7 +390,7 @@ 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")) { + else if(!strcmp(name,"WM/Track") && s->track == 0) { char track[8]; get_str16_nolen(pb, value_len, track, sizeof(track)); s->track = strtol(track, NULL, 10) + 1; @@ -405,7 +405,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) if ((value_type >= 2) && (value_type <= 5)) // boolean or DWORD or QWORD or WORD { value_num= get_value(pb, value_type); - if (!strcmp(name,"WM/Track" )) s->track = value_num + 1; + if (!strcmp(name,"WM/Track" ) && s->track == 0) s->track = value_num + 1; if (!strcmp(name,"WM/TrackNumber")) s->track = value_num; } } |