[mythtv] [patch] AC3 patches

Mark Anderson markjanderson at mail.com
Sat Jan 29 17:26:16 EST 2005


For those following the AC3 audio saga, here is a patch against the CVS from 
yesterday to get AC3 audio up and running with DVB. This patch is different 
to previous patches in a number of ways, mostly I have changed things after 
advice from Isaac.

Notes:

1. There is no longer a GUI option for Dolby Audio, I agree with Isaac that it 
is not needed. This simplifies the patch greatly.

2. There is finally what I regard as a good fix for the mpeg "ghost" audio 
track problem. I have added a call to av_remove_stream in SeekReset in 
avformat decoder. This clears all streams from mpeg.c whenever channels 
change. There is still a chance for "ghost" tracks when a station changes the 
available audio tracks whilst you are watching. 

3. I have changed the algorithm in autoSelectAudio track. The original 
function (what is in CVS now)  selects the first audio track that has at 
least minchannels channels, where minchannels was 2 for ac3passthru and 1 
otherwise. I have changed the algorithm to choose the first ac3 track it 
finds, or if no ac3 is found then it chooses the audio track with the highest 
number of channels. 

This could possibly be enhanced to honour language settings and check sample 
rate as well.

4. The ChackAudioParams change has been replaced with strategic calls to 
SetupAudioStream() in inc,dec,setCurrentAudioTrack and autoSelectAudioTrack. 
This seems to fix the audio initialisation problems, although occasionaly 
when I change from a station with ac3 to one without I get no audio, this is 
quite rare but still needs to be investigated.

Cheers,
Mark Anderson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ac3-patch5.diff
Type: text/x-diff
Size: 5498 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050130/c5430dd2/ac3-patch5-0001.bin


More information about the mythtv-dev mailing list