GstDecodeChain *chain;
GstDecodeBin *dbin;
- if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) &&
- (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) != GST_EVENT_CAPS) &&
- (GST_EVENT_IS_STICKY (GST_PAD_PROBE_INFO_EVENT (info))
- || !GST_EVENT_IS_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) {
- /* do not block on sticky or out of band events otherwise the allocation query
- from demuxer might block the loop thread */
- return GST_PAD_PROBE_PASS;
+ if (GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) {
+ GST_LOG_OBJECT (pad, "Seeing event '%s'",
+ GST_EVENT_TYPE_NAME (GST_PAD_PROBE_INFO_EVENT (info)));
+ if ((GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) != GST_EVENT_CAPS)
+ && (GST_EVENT_IS_STICKY (GST_PAD_PROBE_INFO_EVENT (info))
+ || !GST_EVENT_IS_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) {
+ /* do not block on sticky or out of band events otherwise the allocation query
+ from demuxer might block the loop thread */
+ GST_LOG_OBJECT (pad, "Letting event through");
+ return GST_PAD_PROBE_PASS;
+ }
}
-
chain = dpad->chain;
dbin = chain->dbin;
}
EXPOSE_UNLOCK (dbin);
+ /* If we unblocked due to a caps event, let it go through */
+ if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) &&
+ (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) == GST_EVENT_CAPS))
+ return GST_PAD_PROBE_PASS;
+
return GST_PAD_PROBE_OK;
}