From 3a1aaf7b21c7bde9f4c3d5342baa64d3e940d05f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 7 Jun 2011 03:14:28 +0200 Subject: [PATCH] ffplay: Fix -vismv Fixes Ticket164 Signed-off-by: Michael Niedermayer --- ffplay.c | 2 +- libavcodec/mpegvideo.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index 3ebcd59c1c..77b1e4e24c 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1622,7 +1622,7 @@ static int input_request_frame(AVFilterLink *link) if (ret < 0) return -1; - if(priv->use_dr1) { + if(priv->use_dr1 && priv->frame->opaque) { picref = avfilter_ref_buffer(priv->frame->opaque, ~0); } else { picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h); diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index c599d1df3b..9397c657ad 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1410,6 +1410,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ pict->data[i]= s->visualization_buffer[i]; } pict->type= FF_BUFFER_TYPE_COPY; + pict->opaque= NULL; ptr= pict->data[0]; block_height = 16>>v_chroma_shift;