OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebddd2e
)
swscale-example: Add comment about the use of av_{malloc,free}.
author
Ramiro Polla
<ramiro.polla@gmail.com>
Tue, 19 Jan 2010 15:42:51 +0000
(15:42 +0000)
committer
Ramiro Polla
<ramiro.polla@gmail.com>
Tue, 19 Jan 2010 15:42:51 +0000
(15:42 +0000)
Originally committed as revision 30373 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
libswscale/swscale-example.c
patch
|
blob
|
history
diff --git
a/libswscale/swscale-example.c
b/libswscale/swscale-example.c
index
a53b64b
..
7c43a39
100644
(file)
--- 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);