changeset 30331:4398e647c2ea

swscale-example: Add comment about the use of av_{malloc,free}.
author ramiro
date Tue, 19 Jan 2010 15:42:51 +0000
parents a1383e528fa7
children b4c3e12c9a08
files libswscale/swscale-example.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);