<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi Guys, my program crashes when sws_scale is called.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I'm using the function to scale from<font color="#990000"> 1754x789</font> to <font color="#990000">1024x461</font>.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I saw in the definition, it says </div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><div class="gmail_default">typedef struct AVFrame {</div><div class="gmail_default">#define AV_NUM_DATA_POINTERS 8</div><div class="gmail_default">    /**</div><div class="gmail_default">     * pointer to the picture/channel planes.</div><div class="gmail_default">     * This might be different from the first allocated byte</div><div class="gmail_default">     *</div><div class="gmail_default">     * Some decoders access areas outside 0,0 - width,height, please</div><div class="gmail_default">     * see avcodec_align_dimensions2(). <font color="#990000">Some filters and swscale can read</font></div><div class="gmail_default"><font color="#990000">     * up to 16 bytes beyond the planes, if these filters are to be used,</font></div><div class="gmail_default"><font color="#990000">     * then 16 extra bytes must be allocated.</font></div><div class="gmail_default">     *</div><div class="gmail_default">     * NOTE: Except for hwaccel formats, pointers not needed by the format</div><div class="gmail_default">     * MUST be set to NULL.</div><div class="gmail_default">     */</div><div class="gmail_default">    uint8_t *data[AV_NUM_DATA_POINTERS];</div><div class="gmail_default"><br></div><div class="gmail_default">Does that mean, as long as sws_scale is called, 16 extra bytes must be allocated? what values should be set in these bytes? does the data as whole (real data + 16 bytes) need to be aligned?</div><div class="gmail_default"><br></div><div class="gmail_default">Thanks</div><div><br></div></div></div>