[MPlayer-dev-eng] [PATCH] Fix vd_ffmpeg.c::get_format() to actually query format

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 19 12:58:10 CET 2009


On Thu, Feb 19, 2009 at 11:40:24AM +0100, Gwenole Beauchesne wrote:
> - init_vo() was never actually testing the fmt[i] since it turned out to 
> unconditionnally test the best_csp previously set.

?? I can't see that.

> - Besides, there are cases where init_vo() (and more precisely, 
> mpcodecs_config_vo()) is no-op because sh->disp_w and sh->disp_h are both 0 
> so we turned out to not actually test VO capabilities. IOW, get_format() 
> can be called as early as neither width nor height are parsed yet.

I am quite sure this is wrong. In order to test a pix_fmt you need to
completely destroy the filter chain and rebuilt it with conversion
filters inserted where-ever necessary, I can't see your query_format do
that?
mpcodecs_config_vo is supposed to do exactly that, if it doesn't it
should be fixed instead, especially since then other decoders are
broken, too.
Width/height being 0 is an issue indeed though, but I think it needs to
be fixed in FFmpeg, because whether a certain image format works can
well depend on the size (e.g. directx uses a different path for RGB
which is not restricted by the maximum overlay dimensions, the YV12 path
is though).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list