[0.11] gst-plugins-bad: nuvdemux: check directly for valid buffer

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 04:24:00 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: ae02c7820b8c6b0e2677969fe03bc9687a67089f
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=ae02c7820b8c6b0e2677969fe03bc9687a67089f

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Mon Jan 23 13:55:33 2012 +0100

nuvdemux: check directly for valid buffer

... rather than doing so indirectly in (incomplete) semantic way.

---

 gst/nuvdemux/gstnuvdemux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c
index 86418f0..bdbaae0 100644
--- a/gst/nuvdemux/gstnuvdemux.c
+++ b/gst/nuvdemux/gstnuvdemux.c
@@ -488,7 +488,7 @@ gst_nuv_demux_stream_data (GstNuvDemux * nuv)
   switch (h->i_type) {
     case 'V':
     {
-      if (h->i_length == 0)
+      if (!buf)
         break;
 
       GST_BUFFER_OFFSET (buf) = nuv->video_offset;
@@ -499,7 +499,7 @@ gst_nuv_demux_stream_data (GstNuvDemux * nuv)
     }
     case 'A':
     {
-      if (h->i_length == 0)
+      if (!buf)
         break;
 
       GST_BUFFER_OFFSET (buf) = nuv->audio_offset;



More information about the gstreamer-commits mailing list