mpegtsbase: do not access variable after unref

Data might not exist anymore
This commit is contained in:
Thiago Santos 2015-06-02 16:40:25 -03:00
parent 06d9b61fc2
commit d91f5e85e7

View file

@ -1039,6 +1039,7 @@ mpegts_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gboolean res = TRUE;
gboolean hard;
MpegTSBase *base = GST_MPEGTS_BASE (parent);
gboolean is_sticky = GST_EVENT_IS_STICKY (event);
GST_DEBUG_OBJECT (base, "Got event %s",
gst_event_type_get_name (GST_EVENT_TYPE (event)));
@ -1078,7 +1079,7 @@ mpegts_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
}
/* Always return TRUE for sticky events */
if (GST_EVENT_IS_STICKY (event))
if (is_sticky)
res = TRUE;
return res;