[FFmpeg-cvslog] ffplay: always free buffersink_params in configure_video_filters
Marton Balint
git at videolan.org
Thu Nov 1 22:15:39 CET 2012
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Oct 28 02:00:52 2012 +0200| [8cb740245daf8a71904787b572d60715654db0b1] | committer: Marton Balint
ffplay: always free buffersink_params in configure_video_filters
Fixes Coverity CID 733792.
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8cb740245daf8a71904787b572d60715654db0b1
---
ffplay.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 0c18940..2339192 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1714,31 +1714,32 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
avfilter_get_by_name("buffer"),
"ffplay_buffer", buffersrc_args, NULL,
graph)) < 0)
- return ret;
+ goto fail;
buffersink_params->pixel_fmts = pix_fmts;
ret = avfilter_graph_create_filter(&filt_out,
avfilter_get_by_name("ffbuffersink"),
"ffplay_buffersink", NULL, buffersink_params, graph);
- av_freep(&buffersink_params);
if (ret < 0)
- return ret;
+ goto fail;
/* SDL YUV code is not handling odd width/height for some driver
* combinations, therefore we crop the picture to an even width/height. */
if ((ret = avfilter_graph_create_filter(&filt_crop,
avfilter_get_by_name("crop"),
"ffplay_crop", "floor(in_w/2)*2:floor(in_h/2)*2", NULL, graph)) < 0)
- return ret;
+ goto fail;
if ((ret = avfilter_link(filt_crop, 0, filt_out, 0)) < 0)
- return ret;
+ goto fail;
if ((ret = configure_filtergraph(graph, vfilters, filt_src, filt_crop)) < 0)
- return ret;
+ goto fail;
is->in_video_filter = filt_src;
is->out_video_filter = filt_out;
+fail:
+ av_freep(&buffersink_params);
return ret;
}
More information about the ffmpeg-cvslog
mailing list