Commit eca537b8 authored by ramiro's avatar ramiro

swscale-example: Add comment about the use of av_{malloc,free}.

git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@30373 b3059339-0415-0410-9bf9-f77b7e298cf2
parent cbed49c7
...@@ -102,6 +102,10 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, ...@@ -102,6 +102,10 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
else else
dstStride[i]= dstW*4; 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); src[i]= av_malloc(srcStride[i]*srcH);
dst[i]= av_malloc(dstStride[i]*dstH); dst[i]= av_malloc(dstStride[i]*dstH);
out[i]= av_malloc(refStride[i]*h); out[i]= av_malloc(refStride[i]*h);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment