summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-10-17 15:13:39 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-10-17 15:18:33 +0200
commitfd964e45d683c82ab7cd4ebb9fa60a6e82976ccf (patch)
treee43049eff5cb7f49c4b216731dc3cc1728ee348a
parentdf452c90c2feb52c8a5ac393a7600af237da05c3 (diff)
i965_drv_video: fix return values to vaRenderPicture().
Undefined status was returned from vaRenderPicture() with no VA buffer. Likewise, any failure to process a VA buffer could still lead to success. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--src/i965_drv_video.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 89c01be..4ba1aa6 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1286,10 +1286,10 @@ i965_decoder_render_picture(VADriverContextP ctx,
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct object_context *obj_context = CONTEXT(context);
- VAStatus vaStatus;
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
int i;
- for (i = 0; i < num_buffers; i++) {
+ for (i = 0; i < num_buffers && vaStatus == VA_STATUS_SUCCESS; i++) {
struct object_buffer *obj_buffer = BUFFER(buffers[i]);
assert(obj_buffer);
@@ -1422,10 +1422,10 @@ i965_encoder_render_picture(VADriverContextP ctx,
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct object_context *obj_context = CONTEXT(context);
- VAStatus vaStatus;
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
int i;
- for (i = 0; i < num_buffers; i++) {
+ for (i = 0; i < num_buffers && vaStatus == VA_STATUS_SUCCESS; i++) {
struct object_buffer *obj_buffer = BUFFER(buffers[i]);
assert(obj_buffer);