On Friday 28 January 2005 09:38, Isaac Richards wrote: > On Thursday 27 January 2005 01:13 pm, Jesper S�rensen wrote: > > Attached you will find the following patches: > > ac3-1 - scanstream crash fix > > Doesn't handle ignoring the stream later on properly. > If you are referring to the same problem a few lines down then yes, it should also be fixed.
> > ac3-2 - stream change callback > > This one looks ok. > Cool. > > ac3-3 - ac3 header fix for transform.c > > Not my call on this. > > > ac3-4.1 - deal with audio codec changes in avformatdecoder > > The audio codec _can't_ change for a given streamtype. The startcode of a > stream in a mpeg file is different based on what codec it is. Streams > returned from libavformat are enumerated by the startcode. A new codec > will be given a new logical stream. If this is necessary, something's > badly wrong in the ts2ps junk the dvb code is using. > This fix did resolve the audio re-initialisation problem. I have just spent some time looking at this fix. If you want a less intrusive fix (as indicated in another mail) then may I suggest we add a call to SetupAudioParams to the end of ScanStreams, incCurrentAudioTrack, decCurrentAudioTrack and setCurrentAudio track. I tried this out and it works fine so I am happy with that alternative if you are. > > ac3-4.2 - setup GUI for ac3wanted option > > ac3-4.3 - make avformatdecoder auto-select AC3 (if "ac3wanted") > > Won't be applying these, I don't see a need for this option. > All day I have been trying to understand how you could make this statement. After running a few tests here at home I now understand. Software AC3 is already built in (I actually thought it wasn't) and so if it encounters an AC3 stream and ac3passthrough is disabled then the software decoding takes over and the audio is presented to the sound card just like MPEG2. Is this correct? If this is true then I could conceed that the GUI option is not needed if you don't mind autoSelectAudioTrack selecting AC3 audio in preference to MPEG tracks when they are available. I think it is poor usability to expect the user to change the audio track each time they change to a channel with both MPEG and AC3 and they want AC3 when it is available. Thanks for your time looking at this. Mark. PS: there is still one more issue that needs to be resolved to get all of this functioning fully, that being the mpeg.c empty audio track problem. I am working on a better fix for this but haven't had a chance to test it fully. The fix involves removing the audio tracks using av_remove_stream the same way mpegts.c does, but finding the right spot to put it is the challenge. SeekReset in avformatdecoder seems like a good candiate, what do you think? I wrote a full explanation of the problem for Jesper if you are interested. > Isaac > _______________________________________________ > mythtv-dev mailing list > [email protected] > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev _______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
