mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
oggdec: reset lastpts so that justins vorbis duration correction is not skiped
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5f9f78dc9b
commit
96fb233e64
@ -121,6 +121,7 @@ static int ogg_reset(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
struct ogg *ogg = s->priv_data;
|
struct ogg *ogg = s->priv_data;
|
||||||
int i;
|
int i;
|
||||||
|
int64_t start_pos = avio_tell(s->pb);
|
||||||
|
|
||||||
for (i = 0; i < ogg->nstreams; i++){
|
for (i = 0; i < ogg->nstreams; i++){
|
||||||
struct ogg_stream *os = ogg->streams + i;
|
struct ogg_stream *os = ogg->streams + i;
|
||||||
@ -135,6 +136,9 @@ static int ogg_reset(AVFormatContext *s)
|
|||||||
os->nsegs = 0;
|
os->nsegs = 0;
|
||||||
os->segp = 0;
|
os->segp = 0;
|
||||||
os->incomplete = 0;
|
os->incomplete = 0;
|
||||||
|
if (start_pos <= s->data_offset) {
|
||||||
|
os->lastpts = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ogg->curidx = -1;
|
ogg->curidx = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user