Unified · Split
| @@ -424,15 +424,14 @@ static int mp3_read_header(AVFormatContext *s) · 423 unmodified lines | |||
| 424 | } | 424 | } |
| 425 | } | 425 | } |
| 426 | if (i == 64 * 1024) { | 426 | if (i == 64 * 1024) { |
| 427 | ret = avio_seek(s->pb, off, SEEK_SET); | 427 | off = avio_seek(s->pb, off, SEEK_SET); |
| 428 | } else { | 428 | } else { |
| 429 | av_log(s, i > 0 ? AV_LOG_INFO : AV_LOG_VERBOSE, "Skipping %d bytes of junk at %"PRId64".\n", i, off); | 429 | av_log(s, i > 0 ? AV_LOG_INFO : AV_LOG_VERBOSE, "Skipping %d bytes of junk at %"PRId64".\n", i, off); |
| 430 | ret = avio_seek(s->pb, off + i, SEEK_SET); | 430 | off = avio_seek(s->pb, off + i, SEEK_SET); |
| 431 | } | 431 | } |
| 432 | if (ret < 0) | 432 | if (off < 0) |
| 433 | return ret; | 433 | return off; |
| 434 | 434 | ||
| 435 | off = avio_tell(s->pb); | ||
| 436 | // the seek index is relative to the end of the xing vbr headers | 435 | // the seek index is relative to the end of the xing vbr headers |
| 437 | for (int i = 0; i < sti->nb_index_entries; i++) | 436 | for (int i = 0; i < sti->nb_index_entries; i++) |
| 438 | sti->index_entries[i].pos += off; | 437 | sti->index_entries[i].pos += off; |