Commit 7b6479cf authored by benoit's avatar benoit

Add support for track numbers when they are set via strings

patch by Patrice Bensoussan: patrice bensoussan free fr


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9318 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ed33a11b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment