# HG changeset patch # User zuxy # Date 1262840390 0 # Node ID c2fc252b0d142a6b391635e4a1abde6d73f5c318 # Parent 561453831add41ae75bb4e5124b4121db1bbfe7e Avoid the error message "Unsupported PixelFormat -1" for ffh264 decoding diff -r 561453831add -r c2fc252b0d14 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Wed Jan 06 16:12:58 2010 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Thu Jan 07 04:59:50 2010 +0000 @@ -207,6 +207,8 @@ static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt){ int imgfmt; + if (fmt == PIX_FMT_NONE) + return; imgfmt = pixfmt2imgfmt(fmt); if (IMGFMT_IS_XVMC(imgfmt) || IMGFMT_IS_VDPAU(imgfmt)) { sh_video_t *sh = avctx->opaque;