decodebin: Remove error case that resulted in two error messages

We already send one in gst_decode_bin_expose() for this case. Only
if we're unable to typefind the caps another error message is needed.
This commit is contained in:
Sebastian Dröge 2014-08-25 15:15:06 +03:00
parent f14494f425
commit 21e9f84486

View file

@ -1822,20 +1822,9 @@ unknown_type:
EXPOSE_UNLOCK (dbin); EXPOSE_UNLOCK (dbin);
if (src == dbin->typefind) { if (src == dbin->typefind) {
gchar *desc; if (!caps || gst_caps_is_empty (caps)) {
if (caps && !gst_caps_is_empty (caps)) {
desc = gst_pb_utils_get_decoder_description (caps);
GST_ELEMENT_ERROR (dbin, STREAM, CODEC_NOT_FOUND,
(_("A %s plugin is required to play this stream, "
"but not installed."), desc),
("No decoder to handle media type '%s'",
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
g_free (desc);
} else {
GST_ELEMENT_ERROR (dbin, STREAM, TYPE_NOT_FOUND, GST_ELEMENT_ERROR (dbin, STREAM, TYPE_NOT_FOUND,
(_("Could not determine type of stream")), (_("Could not determine type of stream")), (NULL));
("Stream caps %" GST_PTR_FORMAT, caps));
} }
do_async_done (dbin); do_async_done (dbin);
} }