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

Diego Biurrun diego at biurrun.de
Wed Jan 19 17:40:56 CET 2005


Alexander Strasser writes:
> 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?

Fixed by Michael's last commit to libavcodec/h264.c.
Thanks

Diego




More information about the MPlayer-dev-eng mailing list