Ensure that there's pages to read for duration calculation in the ogg demuxer
authorDavid Conrad <lessen42@gmail.com>
Wed, 15 Apr 2009 06:41:08 +0000 (06:41 +0000)
committerDavid Conrad <lessen42@gmail.com>
Wed, 15 Apr 2009 06:41:08 +0000 (06:41 +0000)
Originally committed as revision 18523 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/oggdec.c

index 28dc56e..5362489 100644 (file)
@@ -450,7 +450,7 @@ ogg_get_length (AVFormatContext * s)
     size = url_fsize(s->pb);
     if(size < 0)
         return 0;
-    end = size > MAX_PAGE_SIZE? size - MAX_PAGE_SIZE: size;
+    end = size > MAX_PAGE_SIZE? size - MAX_PAGE_SIZE: 0;
 
     ogg_save (s);
     url_fseek (s->pb, end, SEEK_SET);