[mythtv] [PATCH] AvFmtDec defaults?
Kenneth Aafløy
lists at kenneth.aafloy.net
Sat Oct 23 17:35:33 UTC 2004
On Saturday 23 October 2004 18:32, Daniel Thor Kristjansson wrote:
> On Sat, 23 Oct 2004, Kenneth Aafløy wrote:
> ]> ]The attached patch removes the defaulting to Mpeg2Video and AC3 in
> ]> ]AvFormatDecoder, it's really just wrong and should be fixed in the
> ]> ]other end instead.
> ]> As far as I know it is fixed on the other end, but I'd like to keep this
> ]> defensive programing in a while. Getting an error message is much nicer
> ]> than a core dump on the back end for end users. It's easilly converted
> ]> to an assert if need be.
> ]I would think forcing the codec to a certain type would cause more harm
> than ]good, no?
>
> A change to an assert might be safer. But the only streams that will
> likely trigger this are broadcast MPEG2 streams, so the only real risk
> is choosing AC3 or MPG audio. And printing error messages should make
> diagnosing a problem easier.
I'm just saying that using a mpeg2video codec on anything not mpeg2video will
most probably make it crash, some codecs are more sensitive to invalid data
than other. Better to tell the user that something was wrong and try to
continue with the warning, if there is not more streams left, the case below
would catch it. Offcourse the warning itself could have been much more
informative.
> ]Also there should be a check at the bottom of ScanStreams to check
> ]if there really is any usefull streams left..
>
> Why? Do you mean if the codec_type is unrecognized but the codec_id is?
Say i'm recording a service on dvb to mpegts, which contains audio, video and
teletext (to get subtitles). Then when the programme for the day is over, the
broadcaster stops transmitting audio and video, but leaves teletext in,
because it's usefull without audio and video..the only stream left would be
the teletext data stream. Should the player still be open in this case?
Or I play back a transport stream with an unknown mpeg extension like the
mpeg4 in ts.
Kenneth
More information about the mythtv-dev
mailing list