mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
msm: vidc: Check NAL stream format for secure session
In case of secure encoding, NAL length based NAL header not supported. Only startcode based NAL header is supported. Change-Id: I119ffa47a003006e5b0d3bf7fbb5eb547de00830
This commit is contained in:
parent
305725a1a9
commit
b1e18454d0
1 changed files with 13 additions and 0 deletions
|
|
@ -3823,6 +3823,19 @@ int msm_venc_set_nal_stream_format(struct msm_vidc_inst *inst)
|
|||
|
||||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD);
|
||||
stream_format.nal_stream_format_select = BIT(ctrl->val);
|
||||
|
||||
/*
|
||||
* Secure encode session supports 0x00000001 satrtcode based
|
||||
* encoding only
|
||||
*/
|
||||
if (is_secure_session(inst) &&
|
||||
ctrl->val != V4L2_MPEG_VIDEO_HEVC_SIZE_0) {
|
||||
dprintk(VIDC_ERR,
|
||||
"%s: Invalid stream format setting for secure session\n",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (ctrl->val) {
|
||||
case V4L2_MPEG_VIDEO_HEVC_SIZE_0:
|
||||
stream_format.nal_stream_format_select =
|
||||
|
|
|
|||
Loading…
Reference in a new issue