1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

oggvorbis: fix the first 2 packets timestamps matching issue

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-05 10:48:08 +02:00
parent 3d42addf33
commit 45a7b0674d

View File

@ -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;
}