Commit 45a7b067 authored by Michael Niedermayer's avatar Michael Niedermayer

oggvorbis: fix the first 2 packets timestamps matching issue

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3d42addf
......@@ -323,9 +323,9 @@ static int vorbis_packet(AVFormatContext *s, int idx)
}
next_pkt += os->segments[seg];
}
os->lastpts = os->lastdts = os->granule - FFMIN(duration, os->granule);
os->lastpts = os->lastdts = os->granule - duration;
if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
s->streams[idx]->start_time = os->lastpts;
s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
if (s->streams[idx]->duration)
s->streams[idx]->duration -= s->streams[idx]->start_time;
}
......
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