<div dir="ltr"><div>slicetypeAnalyse::maxSearch also needs to be changed, or you could trigger another crash using --b-adapt 1.<br><br></div>It seems to me, under the hood we're just incrementing lookaheadDepth. That may be the right thing to do here, or do a CHECK for lookaheadDepth >= bframes?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 12:25 PM, <span dir="ltr"><<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Aarthi Thirumalai<br>
# Date 1425883938 -19800<br>
# Mon Mar 09 12:22:18 2015 +0530<br>
# Node ID 520ab30492f631b5502b309183f47efc0b8a9768<br>
# Parent 043c2418864b0a3ada6f597e6def6ead73d90b5f<br>
slicetype: fix crash when rc-lookahead = bframes.<br>
<br>
diff -r 043c2418864b -r 520ab30492f6 source/encoder/slicetype.cpp<br>
--- a/source/encoder/slicetype.cpp Fri Mar 06 13:15:55 2015 -0600<br>
+++ b/source/encoder/slicetype.cpp Mon Mar 09 12:22:18 2015 +0530<br>
@@ -484,7 +484,7 @@<br>
memset(m_preframes, 0, sizeof(m_preframes));<br>
m_preTotal = m_preAcquired = m_preCompleted = 0;<br>
m_sliceTypeBusy = false;<br>
- m_fullQueueSize = m_param->lookaheadDepth;<br>
+ m_fullQueueSize = X265_MAX(m_param->lookaheadDepth, m_param->bframes + 1);<br>
m_bAdaptiveQuant = m_param->rc.aqMode || m_param->bEnableWeightedPred || m_param->bEnableWeightedBiPred;<br>
<br>
/* If we have a thread pool and are using --b-adapt 2, it is generally<br>
@@ -835,7 +835,7 @@<br>
{<br>
Lowres *frames[X265_LOOKAHEAD_MAX];<br>
Frame *list[X265_LOOKAHEAD_MAX];<br>
- int maxSearch = X265_MIN(m_param->lookaheadDepth, X265_LOOKAHEAD_MAX);<br>
+ int maxSearch = X265_MIN(X265_MAX(m_param->lookaheadDepth, m_param->bframes + 1), X265_LOOKAHEAD_MAX);<br>
<br>
memset(frames, 0, sizeof(frames));<br>
memset(list, 0, sizeof(list));<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>