[MPlayer-cvslog] r33130 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sun Mar 27 16:02:32 CEST 2011
Author: reimar
Date: Sun Mar 27 16:02:32 2011
New Revision: 33130
Log:
Always use get_format, reduces usage of CODEC_CAP_HWACCEL* conditions.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sun Mar 27 15:19:32 2011 (r33129)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sun Mar 27 16:02:32 2011 (r33130)
@@ -303,10 +303,7 @@ static int init(sh_video_t *sh){
avctx->codec_type = AVMEDIA_TYPE_VIDEO;
avctx->codec_id = lavc_codec->id;
-#if CONFIG_VDPAU || CONFIG_XVMC
- if(lavc_codec->capabilities & (CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_HWACCEL))
- avctx->get_format = get_format;
-#endif /* CONFIG_VDPAU */
+ avctx->get_format = get_format;
if(ctx->do_dr1){
avctx->flags|= CODEC_FLAG_EMU_EDGE;
avctx->get_buffer= get_buffer;
@@ -975,7 +972,6 @@ static mp_image_t *decode(sh_video_t *sh
return mpi;
}
-#if CONFIG_XVMC || CONFIG_VDPAU
static enum PixelFormat get_format(struct AVCodecContext *avctx,
const enum PixelFormat *fmt){
enum PixelFormat selected_format;
@@ -992,7 +988,8 @@ static enum PixelFormat get_format(struc
}
}
selected_format = fmt[i];
+ if (selected_format == PIX_FMT_NONE)
+ selected_format = avcodec_default_get_format(avctx, fmt);
set_format_params(avctx, selected_format);
return selected_format;
}
-#endif /* CONFIG_XVMC || CONFIG_VDPAU */
More information about the MPlayer-cvslog
mailing list