<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 27, 2013 at 10:19 PM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Fri, Sep 27, 2013 at 11:30 AM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 27 Sep, <a href="mailto:shazeb@multicorewareinc.com" target="_blank">shazeb@multicorewareinc.com</a> wrote :<br>


<div>> -        X265_FREE(fpelPlane);<br>
> +        X265_FREE(fpelPlane - m_startPad);<br>
<br>
</div>Is this always allowed?<br></blockquote><div><br></div></div><div>It's not robust, this if statement also needs to verify refPlane is not NULL  applyWeight() also needs to check for earlier malloc failure and early-out.</div>
</div></div></div></blockquote><div><br></div><div>What shall be the proper way to handle this condition in applyWeight(): when fpelPlane has no allocation.</div><div><br></div><div>One way out is to have a flag in MotionReference object which must be set 'false' on malloc fail ('true' by default); and this flag must be checked before calling applyweight() and using the weighted pixels.</div>
<div>But the problem with this approach will be that the condition will stay unreported.</div><div><br></div><div>Any suggestions?</div><div><br></div><div><br></div><div><br></div><div>Shazeb</div></div></div></div>