]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_pad.c
lavfi: add showwaves filter
[ffmpeg] / libavfilter / vf_pad.c
index 413fde1f6ca1717af179600ff916da4a84d78af9..08a1f8e6682a8cb665534015003ca2c1d433502f 100644 (file)
@@ -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);