[MPlayer-cvslog] r36713 - trunk/libmpcodecs/vd.c
reimar
subversion at mplayerhq.hu
Thu Jan 23 20:36:52 CET 2014
Author: reimar
Date: Thu Jan 23 20:36:52 2014
New Revision: 36713
Log:
vd: Make sure we test the preferred format first.
Otherwise vd_ffmpeg will always convert 422 to 420
for e.g. ffh246 since it only needs a stride adjustment.
Modified:
trunk/libmpcodecs/vd.c
Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c Thu Jan 23 20:21:53 2014 (r36712)
+++ trunk/libmpcodecs/vd.c Thu Jan 23 20:36:52 2014 (r36713)
@@ -152,6 +152,7 @@ int mpcodecs_config_vo(sh_video_t *sh, i
unsigned int preferred_outfmt)
{
int i, j;
+ int only_preferred = 1;
unsigned int out_fmt = 0;
int screen_size_x = 0; //SCREEN_SIZE_X;
int screen_size_y = 0; //SCREEN_SIZE_Y;
@@ -189,9 +190,15 @@ int mpcodecs_config_vo(sh_video_t *sh, i
}
j = -1;
- for (i = 0; i < CODECS_MAX_OUTFMT; i++) {
+ for (i = 0; only_preferred || i < CODECS_MAX_OUTFMT; i++) {
int flags;
+ if (i == CODECS_MAX_OUTFMT) {
+ i = 0;
+ only_preferred = 0;
+ }
out_fmt = sh->codec->outfmt[i];
+ if (only_preferred && out_fmt != preferred_outfmt)
+ continue;
if (out_fmt == (unsigned int) 0xFFFFFFFF)
continue;
// check (query) if codec really support this outfmt...
More information about the MPlayer-cvslog
mailing list