<div dir="ltr">Hi Andy,<div><br></div><div>Please test this patch for regressions.</div><div><br></div><div>Cheers,</div><div>Nayan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 6:45 PM, Nayan Deshmukh <span dir="ltr"><<a href="mailto:nayan26deshmukh@gmail.com" target="_blank">nayan26deshmukh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If begin_frame is called before setting intra_matrix and<br>
non_intra_matrix it leads to segmentation faults when<br>
vl_mpeg12_decoder.c is used.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=92634" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=92634</a><br>
Signed-off-by: Nayan Deshmukh <<a href="mailto:nayan26deshmukh@gmail.com">nayan26deshmukh@gmail.com</a>><br>
---<br>
 src/gallium/state_trackers/va/<wbr>picture.c | 6 +++---<br>
 1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/gallium/state_trackers/<wbr>va/picture.c b/src/gallium/state_trackers/<wbr>va/picture.c<br>
index b5b9a83..dc7121c 100644<br>
--- a/src/gallium/state_trackers/<wbr>va/picture.c<br>
+++ b/src/gallium/state_trackers/<wbr>va/picture.c<br>
@@ -178,9 +178,6 @@ handlePictureParameterBuffer(<wbr>vlVaDriver *drv, vlVaContext *context, vlVaBuffer *<br>
<br>
       if (!context->decoder)<br>
          return VA_STATUS_ERROR_ALLOCATION_<wbr>FAILED;<br>
-<br>
-      context->decoder->begin_frame(<wbr>context->decoder, context->target,<br>
-         &context->desc.base);<br>
    }<br>
<br>
    return vaStatus;<br>
@@ -310,6 +307,9 @@ handleVASliceDataBufferType(<wbr>vlVaContext *context, vlVaBuffer *buf)<br>
    buffers[num_buffers] = buf->data;<br>
    sizes[num_buffers] = buf->size;<br>
    ++num_buffers;<br>
+<br>
+   context->decoder->begin_frame(<wbr>context->decoder, context->target,<br>
+      &context->desc.base);<br>
    context->decoder->decode_<wbr>bitstream(context->decoder, context->target, &context->desc.base,<br>
       num_buffers, (const void * const*)buffers, sizes);<br>
 }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
</font></span></blockquote></div><br></div>