mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
decodebin2: avoid assertion failure on empty/NULL caps
This commit is contained in:
parent
3b4c35e319
commit
188d698449
1 changed files with 13 additions and 7 deletions
|
@ -1118,13 +1118,19 @@ unknown_type:
|
||||||
if (src == dbin->typefind) {
|
if (src == dbin->typefind) {
|
||||||
gchar *desc;
|
gchar *desc;
|
||||||
|
|
||||||
desc = gst_pb_utils_get_decoder_description (caps);
|
if (caps && !gst_caps_is_empty (caps)) {
|
||||||
GST_ELEMENT_ERROR (dbin, STREAM, CODEC_NOT_FOUND,
|
desc = gst_pb_utils_get_decoder_description (caps);
|
||||||
(_("A %s plugin is required to play this stream, but not installed."),
|
GST_ELEMENT_ERROR (dbin, STREAM, CODEC_NOT_FOUND,
|
||||||
desc),
|
(_("A %s plugin is required to play this stream, "
|
||||||
("No decoder to handle media type '%s'",
|
"but not installed."), desc),
|
||||||
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
|
("No decoder to handle media type '%s'",
|
||||||
g_free (desc);
|
gst_structure_get_name (gst_caps_get_structure (caps, 0))));
|
||||||
|
g_free (desc);
|
||||||
|
} else {
|
||||||
|
GST_ELEMENT_ERROR (dbin, STREAM, TYPE_NOT_FOUND,
|
||||||
|
(_("Could not determine type of stream")),
|
||||||
|
("Stream caps %" GST_PTR_FORMAT, caps));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
||||||
|
|
Loading…
Reference in a new issue