[gst-cvs] gst-plugins-base: theoradec: return GST_CLOCK_TIME_NONE for negative framecounts.

Edward Hervey bilboed at kemper.freedesktop.org
Sat Apr 4 07:31:08 PDT 2009


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

Author: Edward Hervey <bilboed at bilboed.com>
Date:   Sun Mar 22 09:46:37 2009 +0100

theoradec: return GST_CLOCK_TIME_NONE for negative framecounts.

This fixes most seeking issues when used with gnonlin.
Fixes #543591

---

 ext/theora/theoradec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c
index 60e2ef2..78b5e08 100644
--- a/ext/theora/theoradec.c
+++ b/ext/theora/theoradec.c
@@ -255,6 +255,8 @@ _theora_granule_start_time (GstTheoraDec * dec, gint64 granulepos)
   if ((framecount = _theora_granule_frame (dec, granulepos)) < 0)
     return GST_CLOCK_TIME_NONE;
 
+  if (framecount < 0)
+    return GST_CLOCK_TIME_NONE;
   return gst_util_uint64_scale_int (framecount * GST_SECOND,
       dec->info.fps_denominator, dec->info.fps_numerator);
 }





More information about the Gstreamer-commits mailing list