<div dir="ltr">Because it is a pointer array.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">-----------------------------------------<br>Productive. Reliable. Fast.</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 17, 2021 at 2:37 PM chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial"><div style="margin:0px">Hello,</div><div style="margin:0px"><br></div><div style="margin:0px">I found there some funny code in the function <b>x264_slicetype_analyse</b>.</div><div style="margin:0px">For example,</div><div style="margin:0px"><br></div><div style="margin:0px">...</div><div style="margin:0px"><div style="margin:0px">    else if( num_frames == 0 )</div><div style="margin:0px">    {</div><div style="margin:0px"><b>        frames[1]->i_type = X264_TYPE_I;</b></div><div style="margin:0px">        return;</div><div style="margin:0px">    }</div><div>...</div><div><div>    /* Restore frametypes for all frames that haven't actually been decided yet. */</div><div>    for( int j = reset_start; j <= num_frames; j++ )</div><div><b>        frames[j]->i_type = frames[j]->i_forced_type;</b></div></div><div>...</div><div><br></div><div><div>In here, the frames[] is temporary Stack allocated array variant, why we setting it's value before return?</div></div><div><br></div><div>Regards,</div><div>Min Chen</div><div><br></div></div></div>_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org" target="_blank">x264-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x264-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x264-devel</a><br>
</blockquote></div>