Mercurial > mplayer.hg
changeset 28627:c327b2e9b259
Return PIX_FMT_NONE if the video system refuses all other formats.
author | iive |
---|---|
date | Thu, 19 Feb 2009 09:21:46 +0000 |
parents | d7faa1ed68aa |
children | a7b4da3584ca |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;