changeset 33199:85d0e813370f

Allow reget_buffer to somewhat work after DRI failure.
author reimar
date Fri, 22 Apr 2011 07:58:06 +0000
parents 1f418f605d13
children 17ed3a57c83c
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Fri Apr 22 07:53:12 2011 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Fri Apr 22 07:58:06 2011 +0000
@@ -624,6 +624,9 @@
     if(init_vo(sh, avctx->pix_fmt) < 0){
         avctx->release_buffer= avcodec_default_release_buffer;
         avctx->get_buffer= avcodec_default_get_buffer;
+        avctx->reget_buffer= avcodec_default_reget_buffer;
+        if (pic->data[0])
+            release_buffer(avctx, pic);
         return avctx->get_buffer(avctx, pic);
     }
 
@@ -636,6 +639,9 @@
 
             ctx->do_dr1=0; //FIXME
             avctx->get_buffer= avcodec_default_get_buffer;
+            avctx->reget_buffer= avcodec_default_reget_buffer;
+            if (pic->data[0])
+                release_buffer(avctx, pic);
             return avctx->get_buffer(avctx, pic);
         }