vd_ffmpeg: handle reget_buffer in DRI failure fallback code

Allow reget_buffer to somewhat work after direct rendering failure.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33286 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2011-04-22 07:58:06 +00:00 committed by Uoti Urpala
parent f8471184e8
commit d09882bd74
1 changed files with 6 additions and 0 deletions

View File

@ -559,6 +559,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
if(init_vo(sh, avctx->pix_fmt) < 0){
avctx->release_buffer= avcodec_default_release_buffer;
avctx->get_buffer= avcodec_default_get_buffer;
avctx->reget_buffer= avcodec_default_reget_buffer;
if (pic->data[0])
release_buffer(avctx, pic);
return avctx->get_buffer(avctx, pic);
}
@ -571,6 +574,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
ctx->do_dr1=0; //FIXME
avctx->get_buffer= avcodec_default_get_buffer;
avctx->reget_buffer= avcodec_default_reget_buffer;
if (pic->data[0])
release_buffer(avctx, pic);
return avctx->get_buffer(avctx, pic);
}