lavfi: use av_fifo_freep
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Tue, 6 May 2014 19:31:08 +0000 (21:31 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 7 May 2014 21:39:47 +0000 (23:39 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavfilter/buffersink.c
libavfilter/buffersrc.c
libavfilter/vf_fps.c

index 5144fdaeee557baa9f4684bd08a6706f7438aafb..345af773ff3995d3a722868380db68235a10fef8 100644 (file)
@@ -76,8 +76,7 @@ static av_cold void uninit(AVFilterContext *ctx)
             av_fifo_generic_read(sink->fifo, &frame, sizeof(frame), NULL);
             av_frame_free(&frame);
         }
-        av_fifo_free(sink->fifo);
-        sink->fifo = NULL;
+        av_fifo_freep(&sink->fifo);
     }
 }
 
index 30d3a3742eafc9bba728e168fe370b931a77ffa2..f910ae5df559d14ce20fef6400ff4526bc6a14c1 100644 (file)
@@ -426,8 +426,7 @@ static av_cold void uninit(AVFilterContext *ctx)
         av_fifo_generic_read(s->fifo, &frame, sizeof(frame), NULL);
         av_frame_free(&frame);
     }
-    av_fifo_free(s->fifo);
-    s->fifo = NULL;
+    av_fifo_freep(&s->fifo);
 }
 
 static int query_formats(AVFilterContext *ctx)
index af3d410b88f93ee6e7c8f69668db1a0ff5f93161..ad7297aab45659289c37ecc433f03baf4987f6d1 100644 (file)
@@ -103,7 +103,7 @@ static av_cold void uninit(AVFilterContext *ctx)
     if (s->fifo) {
         s->drop += av_fifo_size(s->fifo) / sizeof(AVFrame*);
         flush_fifo(s->fifo);
-        av_fifo_free(s->fifo);
+        av_fifo_freep(&s->fifo);
     }
 
     av_log(ctx, AV_LOG_VERBOSE, "%d frames in, %d frames out; %d frames dropped, "