[FFmpeg-devel] [PATCH] cmdutils: reset *picref_ptr to NULL in get_filtered_frame()

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri May 20 01:02:18 CEST 2011


Avoid the presence of an invalid pointer, fix a crash in case of
get_filtered_frame() failure.
---
 cmdutils.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index a5363b8..71d6d33 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -908,6 +908,7 @@ int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame,
 {
     int ret;
     AVFilterBufferRef *picref;
+    *picref_ptr = NULL;
 
     if ((ret = avfilter_request_frame(ctx->inputs[0])) < 0)
         return ret;
-- 
1.7.2.3



More information about the ffmpeg-devel mailing list