mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
vf_pad: check that we have write permission before writing in the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2b1fc5621d
commit
46c50b1726
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user