From 68c819691242b3665e474e5f5819aa2fb241a5ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 13 Mar 2013 09:34:43 +0100 Subject: [PATCH] omxvideoenc: RPi returns garbage for OMX_IndexParamVideoBitrate, work around that --- omx/gstomxvideoenc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index e8078aa..484bb75 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -279,6 +279,13 @@ gst_omx_video_enc_open (GstVideoEncoder * encoder) OMX_IndexParamVideoBitrate, &bitrate_param); if (err == OMX_ErrorNone) { +#ifdef USE_OMX_TARGET_RPI + /* FIXME: Workaround for RPi returning garbage for this parameter */ + if (bitrate_param.nVersion == 0) { + GST_OMX_INIT_STRUCT (&bitrate_param); + bitrate_param.nPortIndex = self->enc_out_port->index; + } +#endif if (self->control_rate != 0xffffffff) bitrate_param.eControlRate = self->control_rate; if (self->target_bitrate != 0xffffffff) -- 2.7.4