[FFmpeg-cvslog] oggvorbis: fix the first 2 packets timestamps matching issue
Michael Niedermayer
git at videolan.org
Sat May 5 11:12:15 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 5 10:48:08 2012 +0200| [45a7b0674dba25295e439b50797e5231ad16b3b7] | committer: Michael Niedermayer
oggvorbis: fix the first 2 packets timestamps matching issue
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45a7b0674dba25295e439b50797e5231ad16b3b7
---
libavformat/oggparsevorbis.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index fa03ed7..28de6bd 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list