From 289df76b58d3d2e60a681a68e7c0eccd62ca0a3c Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 26 Apr 2003 10:32:45 +0000 Subject: segfault fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9992 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libmpcodecs/vd_ffmpeg.c') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 9d5a68399a..87f87263ee 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -394,7 +394,13 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ | (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 -- cgit v1.2.3