mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +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) {
|
||||
gchar *desc;
|
||||
|
||||
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);
|
||||
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,
|
||||
(_("Could not determine type of stream")),
|
||||
("Stream caps %" GST_PTR_FORMAT, caps));
|
||||
}
|
||||
}
|
||||
|
||||
gst_element_post_message (GST_ELEMENT_CAST (dbin),
|
||||
|
|
Loading…
Reference in a new issue