ffplay: Fix -vismv
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Jun 2011 01:14:28 +0000 (03:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Jun 2011 01:17:42 +0000 (03:17 +0200)
Fixes Ticket164

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffplay.c
libavcodec/mpegvideo.c

index 3ebcd59..77b1e4e 100644 (file)
--- 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);
index c599d1d..9397c65 100644 (file)
@@ -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;