segfault fix

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9992 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2003-04-26 10:32:45 +00:00
parent 6744b62fc0
commit 289df76b58
1 changed files with 7 additions and 1 deletions

View File

@ -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