diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2013-07-25 10:52:31 +0200 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-09-09 16:39:31 +0800 |
commit | 57a1950f0f002928e809ad13d7b6f2bce7005048 (patch) | |
tree | 896fbc0dd1c9d27e964489adf74aacee9dfb3b17 | |
parent | 13b89a6f055f728a2f43166f798ee16cb99a7b50 (diff) |
vpp: fix output filter count from QueryVideoProcFilters().
When vaQueryVideoProcFilters() returns VA_STATUS_ERROR_MAX_NUM_EXCEEDED,
i.e. when the caller allocated too few entries for the filters argument,
then the num_filters argument shall be adjusted to correct number of
entries that need to be re-allocated.
https://bugs.freedesktop.org/show_bug.cgi?id=67292
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 5b584344bd145b191968e2200404a4012a531b61)
-rwxr-xr-x | src/i965_drv_video.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index 340ec15..3ea0078 100755 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -4566,8 +4566,11 @@ VAStatus i965_QueryVideoProcFilters( for (i = 0; i < i965->codec_info->num_filters; i++) { if (i965_os_has_ring_support(ctx, i965->codec_info->filters[i].ring)) { - if (num == *num_filters) + if (num == *num_filters) { + *num_filters = i965->codec_info->num_filters; + return VA_STATUS_ERROR_MAX_NUM_EXCEEDED; + } filters[num++] = i965->codec_info->filters[i].type; } |