mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rpicamsrc: Clear intra-refresh MMAL param struct.
Use memset on the stack allocated MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T struct. Apparently mmal_port_parameter_get() doesn't retrieve all parameters, causing random failures when we set the intra-refresh param on the encoder. Fixes https://github.com/thaytan/gst-rpicamsrc/issues/22 for me.
This commit is contained in:
parent
4d70e1d8ee
commit
3771777f7f
1 changed files with 7 additions and 0 deletions
|
@ -1441,6 +1441,13 @@ static MMAL_STATUS_T create_encoder_component(RASPIVID_STATE *state)
|
|||
if (config->intra_refresh_type != -1)
|
||||
{
|
||||
MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T param;
|
||||
|
||||
/* Need to memset, apparently mmal_port_parameter_get()
|
||||
* doesn't retrieve all parameters, causing random failures
|
||||
* when we set it
|
||||
*/
|
||||
memset (¶m, 0, sizeof (MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T));
|
||||
|
||||
param.hdr.id = MMAL_PARAMETER_VIDEO_INTRA_REFRESH;
|
||||
param.hdr.size = sizeof(param);
|
||||
|
||||
|
|
Loading…
Reference in a new issue