diff options
author | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-16 15:34:55 +0000 |
---|---|---|
committer | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-16 15:34:55 +0000 |
commit | 766b00dbe220a9b6f538b84a91eed05ec779a58a (patch) | |
tree | f4c11379732297d0e1bb51b3cf7f986e7353c226 /libmpcodecs/vd_ffmpeg.c | |
parent | 2e90c1dffcacdc62d263e994b2a87a8afa1afeed (diff) |
use flag for XvMC codec recognition and enable dr1 for fixed version of lavc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12034 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index bb7575e5a2..c2dc90577a 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -194,8 +194,13 @@ static int init(sh_video_t *sh){ #endif #ifdef HAVE_XVMC + +#ifdef CODEC_CAP_HWACCEL + if(lavc_codec->capabilities & CODEC_CAP_HWACCEL){ +#else if(lavc_codec->id == CODEC_ID_MPEG2VIDEO_XVMC){ - printf("vd_ffmpeg: XVMC accelerated MPEG2\n"); +#endif + printf("vd_ffmpeg: XVMC accelerated codec\n"); assert(ctx->do_dr1);//these are must to! assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails avctx->flags|= CODEC_FLAG_EMU_EDGE;//do i need that??!! @@ -674,10 +679,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ if(len<=0) return NULL; // skipped frame +#if LIBAVCODEC_BUILD < 4707 + #ifdef HAVE_XVMC -// in fact if(!dr1) should be the only condition, but this way we hide an -//ffmpeg interlace (mpeg2) bug. use -noslices to avoid it. - if( !avctx->xvmc_acceleration )// && (!dr1) ) + if( !avctx->xvmc_acceleration ) +#endif + +#else +//ffmpeg interlace (mpeg2) bug have been fixed. no need of -noslices + if (!dr1) #endif avctx->draw_horiz_band=NULL; avctx->opaque=sh; |