# HG changeset patch # User ramiro # Date 1263915771 0 # Node ID 4398e647c2eaaf95117551c238ab7948458c5300 # Parent a1383e528fa7917e075a51fa84c5d977a2d57ed7 swscale-example: Add comment about the use of av_{malloc,free}. diff -r a1383e528fa7 -r 4398e647c2ea libswscale/swscale-example.c --- a/libswscale/swscale-example.c Tue Jan 19 13:35:57 2010 +0000 +++ b/libswscale/swscale-example.c Tue Jan 19 15:42:51 2010 +0000 @@ -102,6 +102,10 @@ else dstStride[i]= dstW*4; + /* Image buffers passed into libswscale can be allocated any way you + * prefer, as long as they're aligned enough for the architecture, and + * they're freed appropriately (such as using av_free for buffers + * allocated with av_malloc). */ src[i]= av_malloc(srcStride[i]*srcH); dst[i]= av_malloc(dstStride[i]*dstH); out[i]= av_malloc(refStride[i]*h);