diff options
-rw-r--r-- | gst/playback/gstdecodebin2.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index fc35ac65d..ed67426c6 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2133,6 +2133,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, GList *to_connect = NULL; GList *to_expose = NULL; gboolean is_parser = FALSE; + gboolean is_decoder = FALSE; /* Set dpad target to pad again, it might've been unset * below but we came back here because something failed @@ -2394,6 +2395,23 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, chain->demuxer = TRUE; } + /* If we are configured to use buffering and there is no demuxer in the + * chain, we still want a multiqueue, otherwise we will ignore the + * use-buffering property. In that case, we will insert a multiqueue after + * the parser or decoder - not elsewhere, otherwise we won't have + * timestamps. + */ + is_decoder = strstr (gst_element_factory_get_metadata (factory, + GST_ELEMENT_METADATA_KLASS), "Decoder") != NULL; + + if (!chain->parent && (is_parser || is_decoder) && dbin->use_buffering) { + chain->demuxer = TRUE; + if (is_decoder) { + GST_WARNING_OBJECT (dbin, + "Buffering messages used for decoded and non-parsed data"); + } + } + CHAIN_MUTEX_UNLOCK (chain); /* Set connection-speed property if needed */ |