mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
vabasedec: Fix a possible NULL pointer dereference
The format in _get_preferred_format_and_caps_features() may be NULL. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6206>
This commit is contained in:
parent
489f310881
commit
a734f95790
1 changed files with 5 additions and 2 deletions
|
@ -876,10 +876,13 @@ gst_va_base_dec_get_preferred_format_and_caps_features (GstVaBaseDec * base,
|
|||
* if downstream doesn't support system memory negotiation will fail later.
|
||||
*/
|
||||
if (is_any) {
|
||||
GstVideoFormat fmt =
|
||||
_caps_video_format_from_chroma (allowed_caps, base->rt_format);
|
||||
features = GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY;
|
||||
|
||||
if (format)
|
||||
*format = _caps_video_format_from_chroma (allowed_caps, base->rt_format);
|
||||
if (capsfeatures && *format != GST_VIDEO_FORMAT_UNKNOWN)
|
||||
*format = fmt;
|
||||
if (capsfeatures && fmt != GST_VIDEO_FORMAT_UNKNOWN)
|
||||
*capsfeatures = gst_caps_features_copy (features);
|
||||
goto bail;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue