frontends/omx/dec: Use the known codec profile when allocating buffers
authorLeo Liu <leo.liu@amd.com>
Tue, 20 Oct 2020 21:44:13 +0000 (17:44 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Oct 2020 14:59:03 +0000 (14:59 +0000)
We should use it since the profile has been known already,
otherwise it will get incorrect buffers in some cases.

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/vid_dec_common.c

index 0a59aad..b22883b 100644 (file)
@@ -56,13 +56,13 @@ void vid_dec_NeedTarget(vid_dec_PrivateType *priv)
       templat.height = priv->codec->height;
       templat.buffer_format = pscreen->get_video_param(
             pscreen,
-            PIPE_VIDEO_PROFILE_UNKNOWN,
+            priv->profile,
             PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
             PIPE_VIDEO_CAP_PREFERED_FORMAT
       );
       templat.interlaced = pscreen->get_video_param(
           pscreen,
-          PIPE_VIDEO_PROFILE_UNKNOWN,
+          priv->profile,
           PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
           PIPE_VIDEO_CAP_PREFERS_INTERLACED
       );