[FFmpeg-cvslog] oggdec/vorbis: fix stream duration condition

Hendrik Leppkes git at videolan.org
Sun Feb 16 03:10:17 CET 2014


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat Feb 15 23:25:33 2014 +0100| [45581ed15d2ad5955e24d809820c1675da68f500] | committer: Michael Niedermayer

oggdec/vorbis: fix stream duration condition

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45581ed15d2ad5955e24d809820c1675da68f500
---

 libavformat/oggparsevorbis.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index b565232..2739123 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -421,7 +421,7 @@ static int vorbis_packet(AVFormatContext *s, int idx)
         os->lastdts                 = os->granule - duration;
         if (s->streams[idx]->start_time == AV_NOPTS_VALUE) {
             s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
-            if (s->streams[idx]->duration)
+            if (s->streams[idx]->duration != AV_NOPTS_VALUE)
                 s->streams[idx]->duration -= s->streams[idx]->start_time;
         }
         priv->final_pts          = AV_NOPTS_VALUE;



More information about the ffmpeg-cvslog mailing list