[0.11] gst-plugins-base: streamsynchronizer: avoid unlikely NULL dereference

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 02:51:10 PST 2012


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

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Thu Jan 19 16:40:22 2012 +0100

streamsynchronizer: avoid unlikely NULL dereference

---

 gst/playback/gststreamsynchronizer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
index b71dcb3..8b80a6b 100644
--- a/gst/playback/gststreamsynchronizer.c
+++ b/gst/playback/gststreamsynchronizer.c
@@ -620,7 +620,8 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
   GST_STREAM_SYNCHRONIZER_LOCK (self);
   stream = gst_pad_get_element_private (pad);
 
-  stream->seen_data = TRUE;
+  if (stream)
+    stream->seen_data = TRUE;
   if (stream && stream->drop_discont) {
     buffer = gst_buffer_make_metadata_writable (buffer);
     GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);



More information about the gstreamer-commits mailing list