Revision 6ec14b33 libavformat/asf.c

View differences:

libavformat/asf.c
390 390
                        {
391 391
                                if     (!strcmp(name,"WM/AlbumTitle")) get_str16_nolen(pb, value_len, s->album, sizeof(s->album));
392 392
                                else if(!strcmp(name,"WM/Genre"     )) get_str16_nolen(pb, value_len, s->genre, sizeof(s->genre));
393
                                else if(!strcmp(name,"WM/Track")) {
393
                                else if(!strcmp(name,"WM/Track") && s->track == 0) {
394 394
                                    char track[8];
395 395
                                    get_str16_nolen(pb, value_len, track, sizeof(track));
396 396
                                    s->track = strtol(track, NULL, 10) + 1;
......
405 405
                        if ((value_type >= 2) && (value_type <= 5)) // boolean or DWORD or QWORD or WORD
406 406
                        {
407 407
                                value_num= get_value(pb, value_type);
408
                                if (!strcmp(name,"WM/Track"      )) s->track = value_num + 1;
408
                                if (!strcmp(name,"WM/Track"      ) && s->track == 0) s->track = value_num + 1;
409 409
                                if (!strcmp(name,"WM/TrackNumber")) s->track = value_num;
410 410
                        }
411 411
                }

Also available in: Unified diff