summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-03-30 19:13:47 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2013-03-30 19:14:40 +0100
commit3b8d0532325e5fcdb8eb7188220d7bd8e0938461 (patch)
tree2bd1a5cf5119360fa77457b5c5a1219e5c7974ec
parent03f658dda2dc9b48672e527b46b4dc686b01cf5e (diff)
videodecoder: forward stream-start immediately
-rw-r--r--gst-libs/gst/video/gstvideodecoder.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
index a9be47e8a..3017074af 100644
--- a/gst-libs/gst/video/gstvideodecoder.c
+++ b/gst-libs/gst/video/gstvideodecoder.c
@@ -967,6 +967,20 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
priv = decoder->priv;
switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_STREAM_START:
+ {
+ GstFlowReturn flow_ret = GST_FLOW_OK;
+
+ flow_ret = gst_video_decoder_drain_out (decoder, FALSE);
+ ret = (flow_ret == GST_FLOW_OK);
+
+ /* Forward STREAM_START immediately. Everything is drained after
+ * the STREAM_START event and we can forward this event immediately
+ * now without having buffers out of order.
+ */
+ forward_immediate = TRUE;
+ break;
+ }
case GST_EVENT_CAPS:
{
GstCaps *caps;