[MPlayer-cvslog] r37296 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sat Oct 18 18:07:09 CEST 2014
Author: reimar
Date: Sat Oct 18 18:07:09 2014
New Revision: 37296
Log:
vd_ffmpeg: print warning about unexpected pixel format.
Makes it easier to figure debug incorrect codec.conf entries.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sat Oct 18 18:07:07 2014 (r37295)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sat Oct 18 18:07:09 2014 (r37296)
@@ -609,14 +609,19 @@ static int init_vo(sh_video_t *sh, enum
const AVCodecContext *avctx = ctx->avctx;
int width, height;
int i;
+ int imgfmt = pixfmt2imgfmt2(pix_fmt, avctx->codec_id);
// avoid initialization for formats not on the supported
// list in the codecs.conf entry.
for (i = 0; i < CODECS_MAX_OUTFMT; i++)
- if (sh->codec->outfmt[i] == pixfmt2imgfmt2(pix_fmt, avctx->codec_id))
+ if (sh->codec->outfmt[i] == imgfmt)
break;
- if (i == CODECS_MAX_OUTFMT)
+ if (i == CODECS_MAX_OUTFMT) {
+ if (imgfmt)
+ mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Unexpected decoder output format %s\n",
+ vo_format_name(imgfmt));
return -1;
+ }
width = avctx->width;
height = avctx->height;
More information about the MPlayer-cvslog
mailing list