[mythtv] [patch]: various audio selection problems with DVDs

Robert McNamara robert.mcnamara at gmail.com
Sun Nov 22 19:39:38 UTC 2009

On Sun, Nov 22, 2009 at 11:35 AM, Martin Kittel <linux at martin-kittel.de> wrote:

> 1. the order in which the audio streams are saved does not match their
> logical order on DVD because the audio streams get sorted by streamid in
> 'AvFormatDecoder::ScanStreams'. Due to this if one selects a track in
> the 'Select Audio Track' OSD (or in the DVD menu itself), a different
> audio track than the one selected will be played if the logical order
> and the order of stream ids does not match (in my case I had a mix of
> AC3 and DTS channels and due to the sorting the DTS channel was always
> last while it was the second logical track on the DVD according to dvdnav).
> I solved this by simply removing the sorting of the audio tracks. This
> is the one fix I am not certain about. Is the sorting actually needed
> someplace else? In that case the logical track position should be added
> to the StreamInfo object (which is not what I did).
> 2. The DVD I was testing with gave me no result for the language code in
> 'AvFormatDecoder::ScanStreams', so internally always the 'Unknown
> Language' was set for the audio streams.
> I added a lookup via dvdnav for the language to get the correct result.
> 3. Problem 2 actually shadowed a bug in
> 'AvFormatDecoder::AutoSelectAudioTrack' which would stop the language
> selection early if more than 1 language existed in the source.
> 4. Switching audio streams via OSD did not switch the state in
> 'DVDRingBufferPriv' accordingly so that if
> 'AvFormatDecoder::ScanStreams' got triggered, I ended up with the
> initial audio stream from the DVD again.
> The patch is against release0-22-fixes as I do not have a working
> version of trunk set up yet. However I checked and at least it still
> applies to trunk.

Hi Martin,

Thanks a lot for the hard work-- Would you mind opening some tickets
for these items at svn.mythtv.org?  The player is largely the same in
trunk still, so hopefully if you are able to get them submitted in
tickets, someone can take a look soon.

I would break out each issue as a separate ticket and patch, as
several of these issues touch code maintained by different people.


More information about the mythtv-dev mailing list