<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - gstreamer vaapih264enc segfault"
href="https://bugs.freedesktop.org/show_bug.cgi?id=102006#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - gstreamer vaapih264enc segfault"
href="https://bugs.freedesktop.org/show_bug.cgi?id=102006">bug 102006</a>
from <span class="vcard"><a class="email" href="mailto:julien.isorce@gmail.com" title="Julien Isorce <julien.isorce@gmail.com>"> <span class="fn">Julien Isorce</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=133180" name="attach_133180" title="proposed patch by Julien Isorce">attachment 133180</a> <a href="attachment.cgi?id=133180&action=edit" title="proposed patch by Julien Isorce">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=102006&attachment=133180'>[review]</a>
proposed patch by Julien Isorce
commit 91d93aa62162f98d6377e5c796b63faa263f2c18
Author: Julien Isorce <<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>>
Date: Tue Jul 25 15:31:28 2017 +0100
st/va: change frame_idx from array to hash table
The picture_id was assumed to be a frame number so in 0-31.
But the vaapi client gstreamer-vaapi uses the surfaces handles
as identifier which are unsigned int.
This bug can happen when using a lot of vaapi surfaces within
the same process. Indeed Mesa/st/va increments a counter for the
surface ID: mesa/util/u_handle_table.c::handle_table_add which
starts from 0 and incremented by 1 at each call.
So creating more than 32 surfaces was a problem.
The following bug contains a test that reproduces the problem
by running a couple of vaapih264enc in the same process. The
above also explains why there was no pb when running them in
separated processes.
Bugzilla: <a class="bz_bug_link
bz_status_NEW "
title="NEW - gstreamer vaapih264enc segfault"
href="show_bug.cgi?id=102006">https://bugs.freedesktop.org/show_bug.cgi?id=102006</a>
Signed-off-by: Julien Isorce <<a href="mailto:jisorce@oblong.com">jisorce@oblong.com</a>>
Tested-by: Tomas Rataj <<a href="mailto:rataj28@gmail.com">rataj28@gmail.com</a>>
Acked-by: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>>
Reviewed-and-tested-by: Boyuan Zhang <<a href="mailto:Boyuan.Zhang@amd.com">Boyuan.Zhang@amd.com</a>></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>