frontends/omx/h265: Check the pps set before the scaling data
authorLeo Liu <leo.liu@amd.com>
Tue, 20 Oct 2020 22:51:23 +0000 (18:51 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Oct 2020 14:59:03 +0000 (14:59 +0000)
Certain clip has no scaling list data in the pps set

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7240>

src/gallium/frontends/omx/bellagio/vid_dec_h265.c

index c50be78..1176669 100644 (file)
@@ -598,6 +598,9 @@ static void picture_parameter_set(vid_dec_PrivateType *priv,
       }
    }
 
+   if (vl_vlc_bits_left(&rbsp->nal) == 0)
+      return;
+
    /* pps_scaling_list_data_present_flag */
    if (vl_rbsp_u(rbsp, 1))
       scaling_list_data(priv, rbsp, sps);