aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/defaults.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-15 21:59:57 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-15 21:59:57 +0000
commit4f909565968158dd6cf5116838e8863f4aa51ecc (patch)
treefbce0e61a476ec662317d97712565d6da4a7b202 /libavfilter/defaults.c
parent23274667c24d4aebba62fe7877e50ead5a2576dc (diff)
downloadffmpeg-4f909565968158dd6cf5116838e8863f4aa51ecc.tar.gz
Ensure that buffers returned by the default allocator are readable, or else
they're useless for outputting. Commited in SoC by Bobby Bingham on 2007-08-17 22:52:18 Originally committed as revision 12070 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/defaults.c')
-rw-r--r--libavfilter/defaults.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c
index da739d9d97..8abdb7e08f 100644
--- a/libavfilter/defaults.c
+++ b/libavfilter/defaults.c
@@ -39,7 +39,9 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms)
ref->pic = pic;
ref->w = link->w;
ref->h = link->h;
- ref->perms = perms;
+
+ /* make sure the buffer gets read permission or it's useless for output */
+ ref->perms = perms | AV_PERM_READ;
pic->refcount = 1;
pic->format = link->format;