pads: no need to deactivate pads that are already in PAD_MODE_NONE

This commit is contained in:
Tim-Philipp Müller 2012-07-03 22:24:22 +01:00
parent 0841ac48f1
commit 95f2cab053

View file

@ -1016,7 +1016,7 @@ gst_pad_activate_mode (GstPad * pad, GstPadMode mode, gboolean active)
if (old == new) if (old == new)
goto was_ok; goto was_ok;
if (active && old != mode) { if (active && old != mode && old != GST_PAD_MODE_NONE) {
/* pad was activate in the wrong direction, deactivate it /* pad was activate in the wrong direction, deactivate it
* and reactivate it in the requested mode */ * and reactivate it in the requested mode */
GST_DEBUG_OBJECT (pad, "deactivating pad from %s mode", GST_DEBUG_OBJECT (pad, "deactivating pad from %s mode",