From 08762d5171bfcc94a36d778679abbf05d5045a51 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 20 Oct 2020 17:44:13 -0400 Subject: [PATCH] frontends/omx/dec: Use the known codec profile when allocating buffers 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 Reviewed-by: Boyuan Zhang Part-of: --- src/gallium/frontends/omx/vid_dec_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/omx/vid_dec_common.c b/src/gallium/frontends/omx/vid_dec_common.c index 0a59aad1ea7..b22883b13de 100644 --- a/src/gallium/frontends/omx/vid_dec_common.c +++ b/src/gallium/frontends/omx/vid_dec_common.c @@ -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 );