Skip to content

Commit e066306

Browse files
lynxeye-devgregkh
authored andcommitted
media: coda: don't overwrite h.264 profile_idc on decoder instance
[ Upstream commit 1f32061 ] On a decoder instance, after the profile has been parsed from the stream __v4l2_ctrl_s_ctrl() is called to notify userspace about changes in the read-only profile control. This ends up calling back into the CODA driver where a missing check on the s_ctrl caused the profile information that has just been parsed from the stream to be overwritten with the default baseline profile. Later on the driver fails to enable frame reordering, based on the wrong profile information. Fixes: 347de126d1da (media: coda: add read-only h.264 decoder profile/level controls) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b3ad2c5 commit e066306

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/media/platform/coda/coda-common.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,8 @@ static int coda_s_ctrl(struct v4l2_ctrl *ctrl)
18041804
break;
18051805
case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
18061806
/* TODO: switch between baseline and constrained baseline */
1807-
ctx->params.h264_profile_idc = 66;
1807+
if (ctx->inst_type == CODA_INST_ENCODER)
1808+
ctx->params.h264_profile_idc = 66;
18081809
break;
18091810
case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
18101811
/* nothing to do, this is set by the encoder */

0 commit comments

Comments
 (0)