mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
vaapidecode: guard if no structure is available in caps
This commit is contained in:
parent
f88d18bebe
commit
e8b52f59f5
1 changed files with 10 additions and 0 deletions
|
@ -325,6 +325,8 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
|
||||||
case GST_VAAPI_CAPS_FEATURE_DMABUF:
|
case GST_VAAPI_CAPS_FEATURE_DMABUF:
|
||||||
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:{
|
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:{
|
||||||
GstStructure *structure = gst_caps_get_structure (state->caps, 0);
|
GstStructure *structure = gst_caps_get_structure (state->caps, 0);
|
||||||
|
if (!structure)
|
||||||
|
break;
|
||||||
|
|
||||||
/* Remove chroma-site and colorimetry from src caps,
|
/* Remove chroma-site and colorimetry from src caps,
|
||||||
* which is unnecessary on downstream if using VASurface
|
* which is unnecessary on downstream if using VASurface
|
||||||
|
@ -886,6 +888,9 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
|
||||||
GstStructure *const structure = gst_caps_get_structure (caps, 0);
|
GstStructure *const structure = gst_caps_get_structure (caps, 0);
|
||||||
const gchar *str = NULL;
|
const gchar *str = NULL;
|
||||||
|
|
||||||
|
if (!structure)
|
||||||
|
break;
|
||||||
|
|
||||||
if ((str = gst_structure_get_string (structure, "alignment"))) {
|
if ((str = gst_structure_get_string (structure, "alignment"))) {
|
||||||
GstVaapiStreamAlignH264 alignment;
|
GstVaapiStreamAlignH264 alignment;
|
||||||
if (g_strcmp0 (str, "au") == 0)
|
if (g_strcmp0 (str, "au") == 0)
|
||||||
|
@ -914,6 +919,9 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
|
||||||
GstStructure *const structure = gst_caps_get_structure (caps, 0);
|
GstStructure *const structure = gst_caps_get_structure (caps, 0);
|
||||||
const gchar *str = NULL;
|
const gchar *str = NULL;
|
||||||
|
|
||||||
|
if (!structure)
|
||||||
|
break;
|
||||||
|
|
||||||
if ((str = gst_structure_get_string (structure, "alignment"))) {
|
if ((str = gst_structure_get_string (structure, "alignment"))) {
|
||||||
GstVaapiStreamAlignH265 alignment;
|
GstVaapiStreamAlignH265 alignment;
|
||||||
if (g_strcmp0 (str, "au") == 0)
|
if (g_strcmp0 (str, "au") == 0)
|
||||||
|
@ -1249,6 +1257,8 @@ gst_vaapidecode_ensure_allowed_sinkpad_caps (GstVaapiDecode * decode)
|
||||||
if (!caps)
|
if (!caps)
|
||||||
continue;
|
continue;
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
if (!structure)
|
||||||
|
continue;
|
||||||
|
|
||||||
profile_name = gst_vaapi_profile_get_name (profile);
|
profile_name = gst_vaapi_profile_get_name (profile);
|
||||||
if (profile_name)
|
if (profile_name)
|
||||||
|
|
Loading…
Reference in a new issue