changeset 9991:8568ef7f6c2f

segfault fix
author michael
date Sat, 26 Apr 2003 10:32:45 +0000
parents 048847439f96
children e33317c4d9af
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Apr 26 05:59:28 2003 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Apr 26 10:32:45 2003 +0000
@@ -394,7 +394,13 @@
                 | (ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0);
     }
 
-    if(init_vo(sh)<0 || ctx->b_count>1 || ctx->ip_count>2){
+    if(init_vo(sh)<0){
+        avctx->release_buffer= avcodec_default_release_buffer;
+        avctx->get_buffer= avcodec_default_get_buffer;
+        return avctx->get_buffer(avctx, pic);
+    }
+    
+    if(ctx->b_count>1 || ctx->ip_count>2){
         printf("DR1 failure\n");
 
         ctx->do_dr1=0; //FIXME