/* Try to expose anything */
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- gst_decode_bin_expose (dbin);
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ gst_decode_bin_expose (dbin);
+ }
}
EXPOSE_UNLOCK (dbin);
do_async_done (dbin);
/* Try to expose anything */
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- gst_decode_bin_expose (dbin);
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ gst_decode_bin_expose (dbin);
+ }
}
EXPOSE_UNLOCK (dbin);
chain->endcaps = gst_caps_ref (caps);
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- gst_decode_bin_expose (dbin);
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ gst_decode_bin_expose (dbin);
+ }
}
EXPOSE_UNLOCK (dbin);
/* we don't set the endcaps because NULL endcaps means early EOS */
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain))
- gst_decode_bin_expose (dbin);
+ if (dbin->decode_chain)
+ if (gst_decode_chain_is_complete (dbin->decode_chain))
+ gst_decode_bin_expose (dbin);
EXPOSE_UNLOCK (dbin);
break;
default:
gst_caps_unref (caps);
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- GST_LOG_OBJECT (dbin,
- "That was the last dynamic object, now attempting to expose the group");
- if (!gst_decode_bin_expose (dbin))
- GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ GST_LOG_OBJECT (dbin,
+ "That was the last dynamic object, now attempting to expose the group");
+ if (!gst_decode_bin_expose (dbin))
+ GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ }
+ } else {
+ GST_DEBUG_OBJECT (dbin, "No decode chain, new pad ignored");
}
EXPOSE_UNLOCK (dbin);
}
CHAIN_MUTEX_UNLOCK (chain);
EXPOSE_LOCK (chain->dbin);
- if (gst_decode_chain_is_complete (chain->dbin->decode_chain)) {
- gst_decode_bin_expose (chain->dbin);
+ if (chain->dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (chain->dbin->decode_chain)) {
+ gst_decode_bin_expose (chain->dbin);
+ }
}
EXPOSE_UNLOCK (chain->dbin);
}
return;
GST_DEBUG_OBJECT (dbin, "Reseting multiqueues buffering");
- CHAIN_MUTEX_LOCK (dbin->decode_chain);
- gst_decode_chain_reset_buffering (dbin->decode_chain);
- CHAIN_MUTEX_UNLOCK (dbin->decode_chain);
+ EXPOSE_LOCK (dbin);
+ if (dbin->decode_chain) {
+ CHAIN_MUTEX_LOCK (dbin->decode_chain);
+ gst_decode_chain_reset_buffering (dbin->decode_chain);
+ CHAIN_MUTEX_UNLOCK (dbin->decode_chain);
+ }
+ EXPOSE_UNLOCK (dbin);
}
/****
*/
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- if (!gst_decode_bin_expose (dbin))
- GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ if (!gst_decode_bin_expose (dbin))
+ GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ }
}
EXPOSE_UNLOCK (dbin);
}
GstDecodeBin *dbin = chain->dbin;
GST_LOG_OBJECT (dbin, "pad %p", pad);
+ EXPOSE_LOCK (dbin);
drain_and_switch_chains (dbin->decode_chain, pad, &last_group, &drained,
&switched);
if (switched) {
/* If we resulted in a group switch, expose what's needed */
- EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain))
- gst_decode_bin_expose (dbin);
- EXPOSE_UNLOCK (dbin);
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain))
+ gst_decode_bin_expose (dbin);
+ }
}
+ EXPOSE_UNLOCK (dbin);
return last_group;
}
dpad->blocked = TRUE;
EXPOSE_LOCK (dbin);
- if (gst_decode_chain_is_complete (dbin->decode_chain)) {
- if (!gst_decode_bin_expose (dbin))
- GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ if (dbin->decode_chain) {
+ if (gst_decode_chain_is_complete (dbin->decode_chain)) {
+ if (!gst_decode_bin_expose (dbin))
+ GST_WARNING_OBJECT (dbin, "Couldn't expose group");
+ }
}
EXPOSE_UNLOCK (dbin);