summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-02 12:59:18 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-09-02 13:00:48 +0300
commit56899b596e6e8c032a8417e54ccfb311653c049d (patch)
tree8f6ad2e718495010d9a0193bc1bde90b40418cf7
parent2157497405b5151d8fb7ee59fb10c809df6f0007 (diff)
decodebin: Include codec description for missing plugins in the error message
If we had plugins and an error occurred we only include the error message caused by this, otherwise we will include the codec description as generated from the caps. This allows to detect which exact codec was missing instead of getting a generic "no suitable decoders found" error message.
-rw-r--r--gst/playback/gstdecodebin2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index 4076769ec..81740674b 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -4316,6 +4316,11 @@ gst_decode_chain_expose (GstDecodeChain * chain, GList ** endpads,
if (chain->deadend_details) {
g_string_append (missing_plugin_details, chain->deadend_details);
g_string_append_c (missing_plugin_details, '\n');
+ } else {
+ gchar *desc = gst_pb_utils_get_codec_description (chain->endcaps);
+ g_string_append_printf (missing_plugin_details, "Missing decoder: %s\n",
+ desc);
+ g_free (desc);
}
*missing_plugin = TRUE;
}