[gst-cvs] gst-plugins-base: oggdemux: only keep last valid granulepos

Wim Taymans wtay at kemper.freedesktop.org
Tue Oct 12 07:07:05 PDT 2010


Module: gst-plugins-base
Branch: master
Commit: fea50233bb0d2ba54b142e735fa300e2191f3dbd
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=fea50233bb0d2ba54b142e735fa300e2191f3dbd

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Oct 12 16:03:36 2010 +0200

oggdemux: only keep last valid granulepos

Only keep the last valid granulepos we see when scanning the last
pages. It is possible that the last page that we inspect has a -1 granulepos, in
which case we want to keep the previous valid time instead.

Fixes #631703

---

 ext/ogg/gstoggdemux.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index c4e64c8..bb20a81 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -2827,9 +2827,9 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
         if (pad->map.serialno == ogg_page_serialno (&og)) {
           gint64 granulepos = ogg_page_granulepos (&og);
 
-          last_granule = granulepos;
-          last_pad = pad;
-          if (last_granule != -1) {
+          if (granulepos != -1) {
+            last_granule = granulepos;
+            last_pad = pad;
             done = TRUE;
           }
           break;





More information about the Gstreamer-commits mailing list