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

ubitux ubitux at gmail.com
Mon Apr 12 18:03:27 CEST 2010


I continued to work on this patch because I expected an issue with one of
my files:
http://yozora-irc.net/~ubitux/vids/Noir-extract-ogg-audio-switch.ogm

Applying my patch and switching audio produce creepy sound for the second
audio (works fine with the lavf demuxer). But still, it works fine with
this sample:

http://yozora-irc.net/~ubitux/vids/ninja-scroll-ogg-audio-switch.ogm

Anyway, I have a few questions about all this stuff:

- 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).

  First time the demux_ogg_control is called, id=0, so it's audio stream
  id 0, and not stream id 1.

  I think I miss something here.

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

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

- Finally, the lavf demuxer has interesting features/design; for example
  it keeps a audio streams list which simplify everything, and it also has
  the ability to grab the ogg metatag so audio streams are associated to
  language name. Shouldn't be good to use lavf per default?

Regards,

-- 
ubitux



More information about the MPlayer-dev-eng mailing list