ffplay: check for buffersink_params allocation success
authorMarton Balint <cus@passwd.hu>
Sat, 27 Oct 2012 23:31:14 +0000 (01:31 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 1 Nov 2012 14:46:18 +0000 (15:46 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index f683149..c6bf611 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1698,6 +1698,9 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
     AVFilterContext *filt_src = NULL, *filt_out = NULL, *filt_format, *filt_crop;
     AVCodecContext *codec = is->video_st->codec;
 
+    if (!buffersink_params)
+        return AVERROR(ENOMEM);
+
     snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
     graph->scale_sws_opts = av_strdup(sws_flags_str);