# HG changeset patch # User michael # Date 1051353165 0 # Node ID 8568ef7f6c2faf6024520122286788641637716b # Parent 048847439f9628a7f0fa9905b005dc53751a26b5 segfault fix diff -r 048847439f96 -r 8568ef7f6c2f libmpcodecs/vd_ffmpeg.c --- 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