<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 22, 2017 at 5:27 PM,  <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@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 Praveen Tiwari <<a href="mailto:praveen@multicorewareinc.com">praveen@multicorewareinc.com</a>><br>
# Date 1511338280 -19800<br>
#      Wed Nov 22 13:41:20 2017 +0530<br>
# Branch stable<br>
# Node ID dd11aa99f40a1af59065984afa9b69<wbr>9d2eb1162e<br>
# Parent  752ed1108fce1b475e0458b70f9250<wbr>3d6343818b<br>
encoder.cpp: fix encoder crash for --analysis-reuse-level=10<br></blockquote><div><br></div><div>Thanks for the fix. Pushed to stable, and merged into default</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 752ed1108fce -r dd11aa99f40a source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp        Tue Nov 21 09:50:45 2017 +0530<br>
+++ b/source/encoder/encoder.cpp        Wed Nov 22 13:41:20 2017 +0530<br>
@@ -1155,6 +1155,8 @@<br>
                     pic_out->analysisData.wt = outFrame->m_analysisData.wt;<br>
                     pic_out->analysisData.<wbr>interData = outFrame->m_analysisData.<wbr>interData;<br>
                     pic_out->analysisData.<wbr>intraData = outFrame->m_analysisData.<wbr>intraData;<br>
+                    pic_out->analysisData.<wbr>modeFlag[0] = outFrame->m_analysisData.<wbr>modeFlag[0];<br>
+                    pic_out->analysisData.<wbr>modeFlag[1] = outFrame->m_analysisData.<wbr>modeFlag[1];<br>
                     if (m_param->bDisableLookahead)<br>
                     {<br>
                         int factor = 1;<br>
@@ -3067,6 +3069,7 @@<br>
                 CHECKED_MALLOC(interData-><wbr>mvpIdx[dir], uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
                 CHECKED_MALLOC(interData-><wbr>refIdx[dir], int8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
                 CHECKED_MALLOC(interData->mv[<wbr>dir], MV, analysis->numPartitions * analysis->numCUsInFrame);<br>
+                CHECKED_MALLOC(analysis-><wbr>modeFlag[dir], uint8_t, analysis->numPartitions * analysis->numCUsInFrame);<br>
             }<br>
<br>
             /* Allocate intra in inter */<br>
@@ -3146,7 +3149,11 @@<br>
                     X265_FREE(((analysis_inter_<wbr>data*)analysis->interData)-><wbr>mvpIdx[dir]);<br>
                     X265_FREE(((analysis_inter_<wbr>data*)analysis->interData)-><wbr>refIdx[dir]);<br>
                     X265_FREE(((analysis_inter_<wbr>data*)analysis->interData)-><wbr>mv[dir]);<br>
-                    X265_FREE(analysis->modeFlag[<wbr>dir]);<br>
+                    if (analysis->modeFlag[dir] != NULL)<br>
+                    {<br>
+                        X265_FREE(analysis->modeFlag[<wbr>dir]);<br>
+                        analysis->modeFlag[dir] = NULL;<br>
+                    }<br>
                 }<br>
             }<br>
             else<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>