Message ID | 1369725976-7828-2-git-send-email-a.hajda@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Andrzej, On 28 May 2013 12:56, Andrzej Hajda <a.hajda@samsung.com> wrote: > This patch fixes a bug which caused overwriting h264 codec > parameters by mpeg4 parameters during V4L2 control setting. Just curious, what was the use case that triggered this issue?
On 05/28/2013 10:31 AM, Sachin Kamat wrote: > Hi Andrzej, > > On 28 May 2013 12:56, Andrzej Hajda <a.hajda@samsung.com> wrote: >> This patch fixes a bug which caused overwriting h264 codec >> parameters by mpeg4 parameters during V4L2 control setting. > Just curious, what was the use case that triggered this issue? > For example it was not possible to set h264 profile and level - they were overwritten by "struct s5p_mfc_mpeg4_enc_params" fields. In general all 'union' fields of s5p_mfc_h264_enc_params were overwritten by s5p_mfc_mpeg4_enc_params and vice versa, the control which was set later was 'the winner'. Furthermore during stream start v4l2_ctrl_handler_setup was called so all controls were refreshed, so the final winners order was determined by controls definition order. Regards Andrzej -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 202d1d7..098459e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -438,7 +438,7 @@ struct s5p_mfc_enc_params { u32 rc_framerate_num; u32 rc_framerate_denom; - union { + struct { struct s5p_mfc_h264_enc_params h264; struct s5p_mfc_mpeg4_enc_params mpeg4; } codec;