From 4eb3f7b3680dd9cb39a695b6903c1674d3675875 Mon Sep 17 00:00:00 2001
From: conrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date: Wed, 15 Apr 2009 06:41:08 +0000
Subject: [PATCH] OGG demuxer: ensure that there's pages to read for duration
 calculation in

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18523 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
---
 libavformat/oggdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 28dc56eeb..5362489f5 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -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);
-- 
2.25.4