Make default end_frame() implementation more useful.
[ffmpeg.git] / libavfilter / defaults.c
index e50543b14825fed5165e77f807c949372d6c317c..ca7a42bbb39b8e57689b47e5331cfa590bc7a3c3 100644 (file)
@@ -77,8 +77,10 @@ void avfilter_default_end_frame(AVFilterLink *link)
     link->cur_pic = NULL;
 
     if(out) {
+        if(out->outpic) {
         avfilter_unref_pic(out->outpic);
         out->outpic = NULL;
+        }
         avfilter_end_frame(out);
     }
 }