Fixed MP3 seeking when resync occurs before the first packet

CQTexperiment
Chris Moeller 2013-11-05 12:10:22 -08:00
parent 045faf23a2
commit b80b3b1199
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
skipped += spf;
avio_skip(s->pb, c.frame_size);
} while ( skipped < timestamp_samples && avio_tell(s->pb) < mp3->filesize );
} while ( (!timestamp_samples || skipped < timestamp_samples) && avio_tell(s->pb) < mp3->filesize );
st->skip_samples = timestamp_samples - skipped + skip_extra;
}