aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNayan Deshmukh <[email protected]>2017-01-13 18:45:31 +0530
committerChristian König <[email protected]>2017-01-16 15:09:01 +0100
commit4b0e9babc673bc4dd834127086982e290b2a3a42 (patch)
tree72aa766d0cc0c69572e6c908547a7a17b573125a /src
parent5597b2b243d96e50b4c151db8200487eae0c4997 (diff)
st/va: delay calling begin_frame until we have all parameters
If begin_frame is called before setting intra_matrix and non_intra_matrix it leads to segmentation faults when vl_mpeg12_decoder.c is used. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92634 Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/va/picture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
index b5b9a8361b9..dc7121c3037 100644
--- a/src/gallium/state_trackers/va/picture.c
+++ b/src/gallium/state_trackers/va/picture.c
@@ -178,9 +178,6 @@ handlePictureParameterBuffer(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *
if (!context->decoder)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
-
- context->decoder->begin_frame(context->decoder, context->target,
- &context->desc.base);
}
return vaStatus;
@@ -310,6 +307,9 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
buffers[num_buffers] = buf->data;
sizes[num_buffers] = buf->size;
++num_buffers;
+
+ context->decoder->begin_frame(context->decoder, context->target,
+ &context->desc.base);
context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base,
num_buffers, (const void * const*)buffers, sizes);
}