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

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 19 15:49:13 PST 2012


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

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