diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-30 15:50:26 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-08-30 15:50:26 +0200 |
commit | 6357bdef63b1f6fca0890c1b98132e5ba54f71df (patch) | |
tree | 69ebb2c3a5cc0cc32e59c275963db23bbe54c673 | |
parent | c591b98864a25fcee865978142d8b79216aac76c (diff) |
oggdemux: Don't reset the pad when pushing resulted in NOT_LINKED
The pad might be linked later and after resetting it it will
only work after resetting all of oggdemux.
-rw-r--r-- | ext/ogg/gstoggdemux.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 6716c1599..cb1f2dd94 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -989,13 +989,15 @@ gst_ogg_pad_stream_out (GstOggPad * pad, gint npackets) GST_LOG_OBJECT (ogg, "packetout discont"); gst_ogg_chain_mark_discont (pad->chain); break; case 1: GST_LOG_OBJECT (ogg, "packetout gave packet of size %ld", packet.bytes); result = gst_ogg_pad_submit_packet (pad, &packet); - if (result != GST_FLOW_OK) + if (result == GST_FLOW_NOT_LINKED) + goto not_linked; + else if (result <= GST_FLOW_UNEXPECTED) goto could_not_submit; break; default: GST_WARNING_OBJECT (ogg, "invalid return value %d for ogg_stream_packetout, resetting stream", ret); @@ -1007,12 +1009,22 @@ gst_ogg_pad_stream_out (GstOggPad * pad, gint npackets) done = (npackets == 0); } } return result; /* ERRORS */ +not_linked: + { + GST_WARNING_OBJECT (ogg, + "could not submit packet for stream %08lx, error: %d", + pad->map.serialno, result); + /* Not resetting the pad here because it might be linked + * later and should work without problems then. + */ + return result; + } could_not_submit: { GST_WARNING_OBJECT (ogg, "could not submit packet for stream %08lx, error: %d", pad->map.serialno, result); gst_ogg_pad_reset (pad); |