aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/omx/vid_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index 07f67999649..b2970a522f3 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -473,6 +473,8 @@ static OMX_ERRORTYPE vid_enc_GetParameter(OMX_HANDLETYPE handle, OMX_INDEXTYPE i
if (format->nPortIndex > 1)
return OMX_ErrorBadPortIndex;
+ if (format->nIndex >= 1)
+ return OMX_ErrorNoMore;
port = (omx_base_video_PortType *)priv->ports[format->nPortIndex];
memcpy(format, &port->sVideoParam, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));