[mythtv] [PATCH] -- picking wrong AC-3 audio stream to play

Doug Larrick doug at ties.org
Thu Feb 17 13:00:03 UTC 2005


Brad Templeton wrote:
> [Whoops, somehow I sent this to users instead of dev]
>
> This is a patch that seems to work for the problem I described in
> a recent message to mythtv-users entitled:
>
>     "Picking the wrong audio stream from multi-stream AC3 causing no sound?"
>
>
> This patch makes the code do what the comments say it does, in that
> the comments say it scans through the streams and picks the first adequate
> audio stream.  The code has a countdown loop which breaks out at the first
> match, which thus will be the highest numbered stream.

I submitted roughly the same patch a month or so ago (indeed, I have it
in my local tree), which was not accepted because apparently the
existing code does the "right" thing for most DVDs.

The real answer is to look at the language, track type, and other
descriptors in either the transport stream or in the AC3 stream itself.
  It would be preferable to get this data from the AC3 stream, since
that should be the same for DVD, DVB, and ATSC.  Unfortunately this data
is not exported from libavcodec.  And also unfortunately, the code to
pull metadata out of a transport stream is used at record time, not
playback time, so this approach is not entirely straightforward either.
  I suppose the recorder could make an entry in the database indicating
which audio stream to prefer, but that doesn't help (a) older recordings
or (b) dvds.

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050217/b38ac36d/signature.pgp


More information about the mythtv-dev mailing list