streamsynchronizer: If we get EOS for an unknown stream just do nothing

instead of dereferencing NULL pointers. This can happen if the stream
was just removed from the streamsynchronizer in a bad time.
This commit is contained in:
Sebastian Dröge 2010-10-31 19:08:32 +01:00
parent fe856a3f7c
commit 92133f7ce4

View file

@ -472,11 +472,15 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
GST_STREAM_SYNCHRONIZER_LOCK (self);
stream = gst_pad_get_element_private (pad);
if (stream) {
GST_DEBUG_OBJECT (pad, "Have EOS for stream %d", stream->stream_number);
stream->is_eos = TRUE;
if (!stream) {
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
GST_WARNING_OBJECT (pad, "EOS for unknown stream");
break;
}
GST_DEBUG_OBJECT (pad, "Have EOS for stream %d", stream->stream_number);
stream->is_eos = TRUE;
seen_data = stream->seen_data;
srcpad = gst_object_ref (stream->srcpad);