[mythtv] [patch] AC3 patches

Isaac Richards ijr at case.edu
Thu Jan 27 19:38:56 EST 2005


On Thursday 27 January 2005 07:18 pm, Tim Davies wrote:
> >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.

Who's saying that this is limited to audio streams?

> >>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).

Another issue completely.

> 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!

That patch certainly is checking for a codec change within a stream, which as 
stated, cannot happen unless the stream was badly muxed.

>>>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.

You can't have a non-ac3 capable frontend.

> 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?

It should present a list to the user, which it happens to do right now.

Isaac


More information about the mythtv-dev mailing list