[mythtv] AvFormatDecoder::InitVideoCodec()
Stuart Auchterlonie
stuarta at squashedfrog.net
Wed Oct 4 13:39:38 UTC 2006
On Wed, Oct 04, 2006 at 09:26:46AM -0400, Daniel Kristjansson wrote:
> On Wed, 2006-10-04 at 10:29 +0100, Stuart Auchterlonie wrote:
> > Can anyone tell me the rationale behind the following code
> > from InitVideoCodec. I'm assuming it's to fix some odd
> > broken streams, but i'm interested in the details.
> >
> > --
> > if (align_width == 0 && align_height == 0)
> > {
> > VERBOSE(VB_PLAYBACK, LOC + "InitVideoCodec "
> > "failed to align dimensions, resetting decoder.");
> > align_width = 640;
> > align_height = 480;
> > fps = 29.97;
> > aspect_ratio = 4.0 / 3;
> > }
>
> I don't remember exactly why it is needed, but I do remember things
> went haywire when I tried to remove it once. I bet the width and
> height always need to be positive and non-zero for video streams
> and possibly the same is true of fps and aspect_ratio. I don't
> think those values are magical in anyway, they are just values
> all display systems can cope with and they aren't crazy like -1
> or 1000000000.
some basic sanity check. that's what i suspected.
>
> BTW this doesn't really fix any streams, it just lets MythTV recover
> without a division by zero or segfault. Sometimes ffmpeg hands us
> a 'video stream' which is really something else, like a html data
> stream. We can't determine the resolution and other video stream
> attributes when this happens.
I wonder if it's ffmpeg or myth that's mis-identifying streams.
(re -dev thread "Problem tuning to channel after 6pm with 0.20")
I'll poke around a bit tonight see if I can work out the culprit.
Stuart
More information about the mythtv-dev
mailing list