# HG changeset patch # User iive # Date 1235035306 0 # Node ID c327b2e9b259757a212f69afbe3036cb76c49279 # Parent d7faa1ed68aa2e74097e3c948ab62f7343418c6b Return PIX_FMT_NONE if the video system refuses all other formats. diff -r d7faa1ed68aa -r c327b2e9b259 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Thu Feb 19 05:09:46 2009 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Thu Feb 19 09:21:46 2009 +0000 @@ -894,7 +894,7 @@ #if CONFIG_XVMC || CONFIG_VDPAU static enum PixelFormat get_format(struct AVCodecContext *avctx, const enum PixelFormat *fmt){ - enum PixelFormat selected_format = fmt[0]; + enum PixelFormat selected_format; int imgfmt; sh_video_t *sh = avctx->opaque; int i; @@ -904,10 +904,10 @@ if(!IMGFMT_IS_XVMC(imgfmt) && !IMGFMT_IS_VDPAU(imgfmt)) continue; mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); if(init_vo(sh, fmt[i]) >= 0) { - selected_format = fmt[i]; break; } } + selected_format = fmt[i]; imgfmt = pixfmt2imgfmt(selected_format); if(IMGFMT_IS_XVMC(imgfmt) || IMGFMT_IS_VDPAU(imgfmt)) { vd_ffmpeg_ctx *ctx = sh->context;