mimdec: Don't try to re-send the same event more than once

This commit is contained in:
Olivier Crête 2010-05-07 19:15:31 -04:00
parent 418a791868
commit f1a88ed76b

View file

@ -271,6 +271,7 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
GST_OBJECT_UNLOCK (mimdec); GST_OBJECT_UNLOCK (mimdec);
if (event) if (event)
result = gst_pad_push_event (mimdec->srcpad, event); result = gst_pad_push_event (mimdec->srcpad, event);
event = NULL;
GST_OBJECT_LOCK (mimdec); GST_OBJECT_LOCK (mimdec);
if (!result) { if (!result) {
GST_WARNING_OBJECT (mimdec, "gst_pad_push_event failed"); GST_WARNING_OBJECT (mimdec, "gst_pad_push_event failed");
@ -393,21 +394,20 @@ gst_mimdec_sink_event (GstPad * pad, GstEvent * event)
mimdec->need_newsegment = FALSE; mimdec->need_newsegment = FALSE;
GST_OBJECT_UNLOCK (mimdec); GST_OBJECT_UNLOCK (mimdec);
res = gst_pad_push_event (mimdec->srcpad, event);
}
break; break;
}
case GST_EVENT_FLUSH_STOP: case GST_EVENT_FLUSH_STOP:
GST_OBJECT_LOCK (mimdec); GST_OBJECT_LOCK (mimdec);
mimdec->need_newsegment = TRUE; mimdec->need_newsegment = TRUE;
GST_OBJECT_UNLOCK (mimdec); GST_OBJECT_UNLOCK (mimdec);
res = gst_pad_push_event (mimdec->srcpad, event);
break; break;
default: default:
res = gst_pad_push_event (mimdec->srcpad, event);
break; break;
} }
res = gst_pad_push_event (mimdec->srcpad, event);
done: done:
gst_object_unref (mimdec); gst_object_unref (mimdec);