From 63eb01d9c1b513952239e13facc9fb2e66c06de9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 4 May 2012 15:44:11 +0200 Subject: [PATCH] oggvorbis: Try to fix pts off by 1 issue. Signed-off-by: Michael Niedermayer --- libavformat/oggparsevorbis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index e536d893ad..f764e3f5be 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -318,8 +318,8 @@ static int vorbis_packet(AVFormatContext *s, int idx) } next_pkt += os->segments[seg]; } - os->lastpts = os->lastdts = os->granule - duration; - s->streams[idx]->start_time = os->lastpts + first_duration; + os->lastpts = os->lastdts = os->granule - duration + first_duration; + s->streams[idx]->start_time = os->lastpts; if (s->streams[idx]->duration) s->streams[idx]->duration -= s->streams[idx]->start_time; priv->final_pts = AV_NOPTS_VALUE;