diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-16 01:54:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-16 01:54:50 +0200 |
commit | 46c50b1726b27604f05511f7661e1e40e891a0e5 (patch) | |
tree | 0b3d4e6680441a01f652e9d3d62377e5bff40f27 /libavfilter/vf_pad.c | |
parent | 2b1fc5621d93b04d6b78b69402c7a796ceac35ed (diff) | |
download | ffmpeg-46c50b1726b27604f05511f7661e1e40e891a0e5.tar.gz |
vf_pad: check that we have write permission before writing in the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_pad.c')
-rw-r--r-- | libavfilter/vf_pad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 413fde1f6c..08a1f8e668 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -284,7 +284,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) ) break; } - pad->needs_copy= plane < 4 && outpicref->data[plane]; + pad->needs_copy= plane < 4 && outpicref->data[plane] || !(outpicref->perms & AV_PERM_WRITE); if(pad->needs_copy){ av_log(inlink->dst, AV_LOG_DEBUG, "Direct padding impossible allocating new frame\n"); avfilter_unref_buffer(outpicref); |