[MPlayer-cvslog] r36512 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sat Nov 16 09:07:09 CET 2013
Author: reimar
Date: Sat Nov 16 09:07:08 2013
New Revision: 36512
Log:
Avoid message spam by not trying formats that will not work.
This helps mostly with the formats that support hardware
acceleration.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sat Nov 16 08:54:17 2013 (r36511)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sat Nov 16 09:07:08 2013 (r36512)
@@ -622,6 +622,14 @@ static int init_vo(sh_video_t *sh, enum
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))
More information about the MPlayer-cvslog
mailing list