summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-04-04 18:18:54 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2013-04-04 18:18:54 +0200
commit461d58795a636b89eed5c8917c5d39551b07cc34 (patch)
treefa8feb6d0692189fc571d6b21c159ad572ee27bc
parent92b77c5aa4536dfa5f1eff0c729560fbf0ba2c52 (diff)
oggdemux: don't push on NOT_LINKED pads
If our previous flow return was NOT_LINKED, don't try to push on the pads some more. If we get a RECONFIGURE event on the pad, try to push on it again.
-rw-r--r--ext/ogg/gstoggdemux.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index 191ae264e..e86809c6c 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -416,6 +416,10 @@ gst_ogg_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
res = gst_ogg_demux_perform_seek (ogg, event);
gst_event_unref (event);
break;
+ case GST_EVENT_RECONFIGURE:
+ GST_OGG_PAD (pad)->last_ret = GST_FLOW_OK;
+ res = gst_pad_event_default (pad, parent, event);
+ break;
default:
res = gst_pad_event_default (pad, parent, event);
break;
@@ -667,7 +671,13 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
/* don't push the header packets when we are asked to skip them */
if (!packet->b_o_s || push_headers) {
- ret = gst_pad_push (GST_PAD_CAST (pad), buf);
+ if (pad->last_ret == GST_FLOW_OK) {
+ ret = gst_pad_push (GST_PAD_CAST (pad), buf);
+ } else {
+ GST_DEBUG_OBJECT (ogg, "not pushing buffer on error pad");
+ ret = pad->last_ret;
+ gst_buffer_unref (buf);
+ }
buf = NULL;
/* combine flows */