changeset 5958:ad447f146859 libavformat

oggdec: Move warning about missing granule to the correct place
author conrad
date Fri, 16 Apr 2010 12:21:38 +0000
parents 986168b721ca
children ed7556aaaea5
files oggdec.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/oggdec.c	Fri Apr 16 12:21:35 2010 +0000
+++ b/oggdec.c	Fri Apr 16 12:21:38 2010 +0000
@@ -362,6 +362,9 @@
             idx, os->psize, os->pstart);
 #endif
 
+    if (os->granule == -1)
+        av_log(s, AV_LOG_WARNING, "Page at %lld is missing granule\n", os->page_pos);
+
     ogg->curidx = idx;
     os->incomplete = 0;
 
@@ -512,8 +515,7 @@
             else
                 os->lastpts = ogg_gptopts(s, idx, os->granule, &os->lastdts);
             os->granule = -1LL;
-        } else
-            av_log(s, AV_LOG_WARNING, "Packet is missing granule\n");
+        }
     }
     return pts;
 }