incaps = gst_pad_get_current_caps (trans->sinkpad);
outcaps = gst_pad_get_current_caps (trans->srcpad);
+ /* srcpad might be flushing already if we're being shut down */
+ if (outcaps == NULL)
+ goto no_outcaps;
+
GST_DEBUG_OBJECT (trans, "getting output size for alloc");
/* copy transform, figure out the output size */
insize = gst_buffer_get_size (inbuf);
return GST_FLOW_OK;
/* ERRORS */
- /* ERRORS */
activate_failed:
{
GST_ELEMENT_ERROR (trans, RESOURCE, SETTINGS,
GST_DEBUG_OBJECT (trans, "could not allocate buffer from pool");
return ret;
}
+no_outcaps:
+ {
+ GST_DEBUG_OBJECT (trans, "no output caps, source pad has been deactivated");
+ gst_caps_unref (incaps);
+ return GST_FLOW_FLUSHING;
+ }
}
typedef struct