diff options
author | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-19 09:21:46 +0000 |
---|---|---|
committer | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-19 09:21:46 +0000 |
commit | c73f0e18bd1d67f2d9521630b2e2f411b9ce6a0e (patch) | |
tree | 3e60da58d47e33edba4f392b12dbe8714ef85617 | |
parent | 65324517a6c6773af6e50ee5b83bf2305c8299ca (diff) | |
download | mpv-c73f0e18bd1d67f2d9521630b2e2f411b9ce6a0e.tar.bz2 mpv-c73f0e18bd1d67f2d9521630b2e2f411b9ce6a0e.tar.xz |
Return PIX_FMT_NONE if the video system refuses all other formats.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28662 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 9a0b9482d6..56c670839d 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -894,7 +894,7 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){ #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 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx, 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; |