[MPlayer-dev-eng] [PATCH] New commands for loading/unloading audio filters at runtime

Jehan Pagès jehan.marmottard at gmail.com
Sun Apr 11 13:13:46 CEST 2010


Hi,

On Sun, Apr 11, 2010 at 6:27 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> Uh, I think he means crashing when he says "crashing", not just "does not play
> audio".

In fact, when I start a file with the filter lavcac3, it would display
the same errors and exits directly, though you are probably right, in
this case, this is probably a clean exit (because mplayer see it
cannot run with such a filter), not a crash (where mplayer loads the
filter anyway, still see it cannot run with it — hence the errors —
but continues anyway — hence the crash).

> Dynamically inserting lavcac3 just can not work (at least not this way) since
> the ao does not get reconfigured, so the output at the very end of the
> filter chain can not change.
> This means two things: 1) adding or removing lavcac3 can not work since (at least
> for adding) we would need a AC3 decoder filter somewhere to get back to the
> same format
> 2) even if it worked, it wouldn't make any sense.

Probably if you say so, though I do not understand much what this
filter is about from the description.

> However the crash is an indication that the error-handling when the filter chain
> after the change is unusable is insufficient.

You are right. I have tracked down the error handling issue and fixed
it (in the function af_add). So now this kind of thing cannot happen
again: if you try to load a filter which cannot be loaded during
runtime, it will be unloaded immediately so playback can continue
without crash.
I thought it was better to fix this error handling at the origin (the
function where the filter is loaded) than in the slave command's code
(where it would have been anyway more complicated afterwards).
Attached is the patch for this.

I think there is also another error handling issue, higher in the
code, which is that if for some other reason, the audio chain gets
corrupted, I guess mplayer should exit properly with an error instead
of crashing.
I will track this down too. Hopefully it should not be too complicated.

By the way, I know I am pretty new around here, but do you think there
is a chance I might get write access to the repository? This i pretty
tiring to make patch all the time...
Thanks.

Jehan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_af_add_bugfix.patch
Type: text/x-patch
Size: 539 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100411/dbf2844b/attachment.bin>


More information about the MPlayer-dev-eng mailing list