# HG changeset patch # User reimar # Date 1384589228 0 # Node ID 93473818b2594e11b258d4176268b3b017389c1e # Parent 06bdd36f5c46ab85e8d168e8f280958e15bb67df Avoid message spam by not trying formats that will not work. This helps mostly with the formats that support hardware acceleration. diff -r 06bdd36f5c46 -r 93473818b259 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sat Nov 16 07:54:17 2013 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Nov 16 08:07:08 2013 +0000 @@ -622,6 +622,14 @@ update_configuration(sh, pix_fmt); if (!ctx->vo_initialized) { + int i; + // 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] == ctx->best_csp) + break; + if (i == CODECS_MAX_OUTFMT) + return -1; sh->disp_w = width; sh->disp_h = height; if (!mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->best_csp))