Mercurial > mplayer.hg
comparison libmpcodecs/vd_ffmpeg.c @ 33197:17dba462c48c
Fix compilation with XvMC, only lightly tested.
author | reimar |
---|---|
date | Fri, 22 Apr 2011 07:28:44 +0000 |
parents | d5406d5a0aec |
children | 85d0e813370f |
comparison
equal
deleted
inserted
replaced
33196:8e423915a5bb | 33197:17dba462c48c |
---|---|
679 } | 679 } |
680 if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5)) | 680 if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5)) |
681 mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::get_buffer (xvmc render=%p)\n", render); | 681 mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::get_buffer (xvmc render=%p)\n", render); |
682 assert(render != 0); | 682 assert(render != 0); |
683 assert(render->xvmc_id == AV_XVMC_ID); | 683 assert(render->xvmc_id == AV_XVMC_ID); |
684 render->state |= AV_XVMC_STATE_PREDICTION; | |
685 } | 684 } |
686 #endif | 685 #endif |
687 | 686 |
688 pic->data[0]= mpi->planes[0]; | 687 pic->data[0]= mpi->planes[0]; |
689 pic->data[1]= mpi->planes[1]; | 688 pic->data[1]= mpi->planes[1]; |
759 | 758 |
760 if (mpi) { | 759 if (mpi) { |
761 // Palette support: free palette buffer allocated in get_buffer | 760 // Palette support: free palette buffer allocated in get_buffer |
762 if (mpi->bpp == 8) | 761 if (mpi->bpp == 8) |
763 av_freep(&mpi->planes[1]); | 762 av_freep(&mpi->planes[1]); |
764 #if CONFIG_XVMC | |
765 if (IMGFMT_IS_XVMC(mpi->imgfmt)) { | |
766 struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)pic->data[2]; //same as mpi->priv | |
767 if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5)) | |
768 mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::release_buffer (xvmc render=%p)\n", render); | |
769 assert(render!=NULL); | |
770 assert(render->xvmc_id == AV_XVMC_ID); | |
771 render->state&=~AV_XVMC_STATE_PREDICTION; | |
772 } | |
773 #endif | |
774 // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU) | 763 // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU) |
775 mpi->usage_count--; | 764 mpi->usage_count--; |
776 } | 765 } |
777 | 766 |
778 if(pic->type!=FF_BUFFER_TYPE_USER){ | 767 if(pic->type!=FF_BUFFER_TYPE_USER){ |