]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.c
Merge remote branch 'qatar/master'
[ffmpeg] / libavfilter / avfilter.c
index 0518e6d6c2d9036dad80b6253cc8f7bc657a39d5..72e0a87f8e80b9c111a7284fe92027df3de43b24 100644 (file)
@@ -73,15 +73,10 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
 static void store_in_pool(AVFilterBufferRef *ref)
 {
     int i;
-    AVFilterLink *link= ref->buf->priv;
-    AVFilterPool *pool;
+    AVFilterPool *pool= ref->buf->priv;
 
     av_assert0(ref->buf->data[0]);
 
-    if(!link->pool)
-        link->pool = av_mallocz(sizeof(AVFilterPool));
-    pool= link->pool;
-
     if(pool->count == POOL_SIZE){
         AVFilterBufferRef *ref1= pool->pic[0];
         av_freep(&ref1->video);
@@ -685,7 +680,6 @@ void avfilter_free(AVFilterContext *filter)
         if ((link = filter->inputs[i])) {
             if (link->src)
                 link->src->outputs[link->srcpad - link->src->output_pads] = NULL;
-            av_freep(&link->pool);
             avfilter_formats_unref(&link->in_formats);
             avfilter_formats_unref(&link->out_formats);
         }
@@ -695,7 +689,6 @@ void avfilter_free(AVFilterContext *filter)
         if ((link = filter->outputs[i])) {
             if (link->dst)
                 link->dst->inputs[link->dstpad - link->dst->input_pads] = NULL;
-            av_freep(&link->pool);
             avfilter_formats_unref(&link->in_formats);
             avfilter_formats_unref(&link->out_formats);
         }