diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-06 21:31:08 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-07 23:39:47 +0200 |
commit | 70b63419ee330a4e6cfcc804061b3917a81e964e (patch) | |
tree | 3087f981f003c8ee4991054d4063b2d9d477700e | |
parent | 351f6118c7e3da6ea7a2ab0a8f7d25b2223f7c5a (diff) | |
download | ffmpeg-streaming-70b63419ee330a4e6cfcc804061b3917a81e964e.zip ffmpeg-streaming-70b63419ee330a4e6cfcc804061b3917a81e964e.tar.gz |
lavfi: use av_fifo_freep
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
-rw-r--r-- | libavfilter/buffersink.c | 3 | ||||
-rw-r--r-- | libavfilter/buffersrc.c | 3 | ||||
-rw-r--r-- | libavfilter/vf_fps.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 5144fda..345af77 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -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); } } diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 30d3a37..f910ae5 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -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) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index af3d410..ad7297a 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -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, " |