[MPlayer-dev-eng] gcc 2.95 bug/oddity?

Alexander Strasser eclipse7 at gmx.net
Wed Jan 19 15:05:53 CET 2005


Michael Niedermayer wrote ( On Wed, Jan 19, 2005 at 02:25:06PM +0100 ):
> On Wednesday 19 January 2005 14:03, Diego Biurrun wrote:
> > I'm stuck there for the moment.  Michael, can you comment on this?
> > It's your code..
> 
> av_q2d() is correct, 0/0 is NAN but it should never be 0/0, as avcodec.h says 
> unknown aspect is 0 not 0/0, should be fixed
>

I guess this bug originates from ffh264.

libavcodec/h264.c on line 3471:
s->avctx->sample_aspect_ratio= h->sps.sar;

But i am no sure on how fix it. I think the sar might not be initialized at
all what would be one possibility why it behaves different with different
compilers. The only initialization code i found wasn't executed, but seemed
dangerous none the less as it has sth like `else { num=den=0; }'.

I think the correct solution is to set the sample aspect to 0/1 ( meaning 0
which means no aspect afaik ) if it wasn't found. 

Maybe someone with more knowledge about this can fix it.
Micheal Niedermayer? Loren Merrit?

  Alex (beastd)




More information about the MPlayer-dev-eng mailing list