[MPlayer-dev-eng] [PATCH]Fail early if vdpau decoder creation will certainly fail

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Mar 21 18:14:33 CET 2009


Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:

> On Sat, Mar 21, 2009 at 02:29:23PM +0100, Carl Eugen Hoyos wrote:
> > Attached patch intends to help in following situations:
> > If user starts more vdpau decoder sessions than supported by hardware.
> 
> Not working instead of not working is not that much "help" IMO.
> It can't even be used to fall back to software decoding if done in
> configure.

But the chances it could be used are higher, no?

> I'd suggest to move _all_ of the code into a separate function, so there
> is no need for an additional static variable and less duplicated code.

Code movement done.
No additional static variable needed;-)

> > If user tries to use vdpau decoder for an unsupported codec/unsupported 
> > size/not even enough video memory for 0 reference frames.
> 
> While I doubt it matters not in practice, I'd like to point out that the

s/not/much?

> possible extra decoder creation will not have any ill effects.
> Depending on how the NVidia driver handles this, it might indeed lead to
> memory fragmentation though, thus decreasing the amount of free memory
> and actually cause playback issues that did not exist previously (as
> said I doubt it matters, fixing the OSD to not use a full output surface
> would probably more than offset this).

So I propose to call create_vdp_decoder(2) from config(). Do you agree that it
is an improvement?

Carl Eugen




More information about the MPlayer-dev-eng mailing list