]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
OGG demuxer: ensure that there's pages to read for duration calculation in
authorconrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 15 Apr 2009 06:41:08 +0000 (06:41 +0000)
committerconrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 15 Apr 2009 06:41:08 +0000 (06:41 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18523 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/oggdec.c

index 28dc56eeb93b1d121dd76560e33921b944932a81..5362489f5c48cb9850a9ca8f1c64d37e89bfdafd 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);