From 593f6650ef0ca751a28ca2631405efaa7bec11a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 25 May 2020 15:46:58 +0200 Subject: [PATCH] libs: decoder: h264: disallow multiple slice group As far as we know there are no VAAPI drivers supporting FMO, which migth be used in baseline streams. This commit is a continuation of https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/328 Part-of: --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 4c64d5e42c..fad3d0e898 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -1832,6 +1832,12 @@ parse_pps (GstVaapiDecoderH264 * decoder, GstVaapiDecoderUnit * unit) return get_status (result); priv->parser_state |= GST_H264_VIDEO_STATE_GOT_PPS; + + if (pps->num_slice_groups_minus1 > 0) { + GST_FIXME ("FMO is not supported"); + return GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER; + } + return GST_VAAPI_DECODER_STATUS_SUCCESS; }