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.
  
This is a lot better than a guaranteed segfault.  It does ignore the stream, but there is no need to abort everything if it can't find a decoder for *one* audio track.  If no audio streams are present (or capable of being decoded) then subsequent code *should* deal with this.  A suggestion or some comments as to why it doesn't handle the streams properly might help. 
  
ac3-2    - stream change callback
    

This one looks ok.
  
One down!

  
ac3-3    - ac3 header fix for transform.c
    

Not my call on this.

  
I think Marcus gave this the okay...

  
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.
  
As far as I can see, mpeg.c is not that clever.  Yes, it will try and put a stream with the same startcode into the same index in nb_streams.  It comes a little unstuck when streams disappear on a channel change, and then it leaves an "empty" entry in nb_streams (but that is another issue).

The avformatdecoder.cpp code is not checking for a codec change *within* a stream anyway.  It is checking for a codec change when it selects a different stream, and that certainly does happen. A lot!

And it is nothing to do with ts2ps.  Recording the TS requires the same patch for the same reasons...

  
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.

  
There are situations when you won't want the AC3 stream, if it is available.  Of the top of my head, you might have two frontends; one AC3 capable, and one not.

And surely if you *can* decode AC3 tracks, you want avformatdecoder to select that track: otherwise what is the point?  Are you suggesting that it randomly selects a track, or uses the first one it finds, or what?  Should we force the frontend to only be capable of dealing with a single audio stream, and let the backend decide?  That doesn't help if you want to record all the audio tracks.  Saying there is no use for it doesn't help much in terms of finding a solution.

Personally, I'd even prefer that you can manually override this as well, and have the ability to select the audio stream you want to listen to at the time.  There may be multilingual audio, or commentary tracks?!?


Tim.
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to