[Libav-user] sws_scale crash

YIRAN LI mrfun.china at gmail.com
Thu Sep 15 03:54:39 EEST 2016


Hi Guys, my program crashes when sws_scale is called.

I'm using the function to scale from 1754x789 to 1024x461.

I saw in the definition, it says

typedef struct AVFrame {
#define AV_NUM_DATA_POINTERS 8
    /**
     * pointer to the picture/channel planes.
     * This might be different from the first allocated byte
     *
     * Some decoders access areas outside 0,0 - width,height, please
     * see avcodec_align_dimensions2(). Some filters and swscale can read
     * up to 16 bytes beyond the planes, if these filters are to be used,
     * then 16 extra bytes must be allocated.
     *
     * NOTE: Except for hwaccel formats, pointers not needed by the format
     * MUST be set to NULL.
     */
    uint8_t *data[AV_NUM_DATA_POINTERS];

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?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160915/5df49b28/attachment.html>


More information about the Libav-user mailing list