[mythtv] [patch] AC3 patches
Isaac Richards
ijr at case.edu
Thu Jan 27 20:57:07 EST 2005
On Thursday 27 January 2005 08:25 pm, Tim Davies wrote:
> Isn't CheckAudioParams running on what could possibly be a new stream?
> Which means the codec could change, and therefore avcodec_find_decoder
> and avcodec_open need to be called in CheckAudioParams? It actually has
> to verify that the codec has changed, and not rely on a sample_rate or
> channels change. We mostly have Dolby 2.0 which has the same channels
> and sample_rate as MPEG2 audio.
All the codecs are already open at that point (from ScanStreams). No need to
open them again. CheckAudioParams is for informing the NVP about what
avformatdecoder is sending it, and reopening the codec on an audio format
change, since most of them don't handle that gracefully in libavcodec. The
NVP object doesn't care what the codec was.
> Well some doofus might not have software AC3 enabled. Or might not want
> to use it. I don't really care myself.
You can't not have it enabled unless you use non-supported options to
configure that aren't shown in --help. If it's not enabled, then the codec
simply won't be able to be opened, and would be skipped (with the first patch
of these). =)
> >>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.
>
> Does it? If I don't use the patch, it just uses the first track it
> finds (in reverse order).
It actually doesn't - I thought JDS had added that at the same time he added
the next/prev track functionality. Wouldn't take long at all to add, though.
Isaac
More information about the mythtv-dev
mailing list