comparison libmpcodecs/vd_ffmpeg.c @ 33199:85d0e813370f

Allow reget_buffer to somewhat work after DRI failure.
author reimar
date Fri, 22 Apr 2011 07:58:06 +0000
parents 17dba462c48c
children 17ed3a57c83c
comparison
equal deleted inserted replaced
33198:1f418f605d13 33199:85d0e813370f
622 } 622 }
623 623
624 if(init_vo(sh, avctx->pix_fmt) < 0){ 624 if(init_vo(sh, avctx->pix_fmt) < 0){
625 avctx->release_buffer= avcodec_default_release_buffer; 625 avctx->release_buffer= avcodec_default_release_buffer;
626 avctx->get_buffer= avcodec_default_get_buffer; 626 avctx->get_buffer= avcodec_default_get_buffer;
627 avctx->reget_buffer= avcodec_default_reget_buffer;
628 if (pic->data[0])
629 release_buffer(avctx, pic);
627 return avctx->get_buffer(avctx, pic); 630 return avctx->get_buffer(avctx, pic);
628 } 631 }
629 632
630 if (IMGFMT_IS_HWACCEL(ctx->best_csp)) { 633 if (IMGFMT_IS_HWACCEL(ctx->best_csp)) {
631 type = MP_IMGTYPE_NUMBERED | (0xffff << 16); 634 type = MP_IMGTYPE_NUMBERED | (0xffff << 16);
634 if(ctx->b_count>1 || ctx->ip_count>2){ 637 if(ctx->b_count>1 || ctx->ip_count>2){
635 mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure); 638 mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure);
636 639
637 ctx->do_dr1=0; //FIXME 640 ctx->do_dr1=0; //FIXME
638 avctx->get_buffer= avcodec_default_get_buffer; 641 avctx->get_buffer= avcodec_default_get_buffer;
642 avctx->reget_buffer= avcodec_default_reget_buffer;
643 if (pic->data[0])
644 release_buffer(avctx, pic);
639 return avctx->get_buffer(avctx, pic); 645 return avctx->get_buffer(avctx, pic);
640 } 646 }
641 647
642 if(avctx->has_b_frames || ctx->b_count){ 648 if(avctx->has_b_frames || ctx->b_count){
643 type= MP_IMGTYPE_IPB; 649 type= MP_IMGTYPE_IPB;