[MPlayer-dev-eng] [PATCH] Switch audio control in OGG demuxer

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 12 19:10:18 CEST 2010


On Mon, Apr 12, 2010 at 06:03:27PM +0200, ubitux wrote:
> - The passed int arg seems to point on the audio stream id, and not the
>   stream id. Do I have to update this argument? If I do this, the audio
>   is disabled (some decoding errors).

You need to update it, otherwise the whole reinitialization is not done and
you won't be able to switch between streams with different codecs.
The ogg demuxer probably does not set up all audio streams correctly, e.g.
fixup_vorbis_wf seems to only be called on the auto-selected one, so not
other vorbis streams can be played.

> - Second question is about the memory leaks: do I have to call
>   ds_free_packs or similar functions to clear everything? Everytime?

I think it's not a memory leak if you don't, but it will give very bad
artefacts if you don't.
Of course you should only call it if you actually switch to a different
track.
And probably that code could be moved common code, e.g. demuxer_switch_audio.

> - Does the audio switch have to cycle on the "mute" channel like lavf
>   does?

Would be nice for consistency, though I don't care much.



More information about the MPlayer-dev-eng mailing list