summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-19 15:42:51 +0000
committerramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-19 15:42:51 +0000
commit4277621a410c701dca7f3ba837f7a108139ba144 (patch)
tree03576e6f7b4dcf7b0d1f8f066a4077790e0eb0d7 /libswscale
parent37fd4d44bda2519e718d7fa3cef62a644539529d (diff)
downloadmpv-4277621a410c701dca7f3ba837f7a108139ba144.tar.bz2
mpv-4277621a410c701dca7f3ba837f7a108139ba144.tar.xz
swscale-example: Add comment about the use of av_{malloc,free}.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30373 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale-example.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index a53b64b659..7c43a39467 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -102,6 +102,10 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
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);