[FFmpeg-devel] [Spam] Re: [PATCH] av_register_all not always initializes correctly
Thu Jan 3 19:21:37 CET 2008
On Thu, Jan 03, 2008 at 09:36:43AM -0300, Gonzalo Garramu?o wrote:
> Michael Niedermayer wrote:
> > quoting the C spec
> Can't fight that. That being said, I'd request for the patch to still
> be considered as it makes the implicit explicit.
No, anyone who remotely knows C knows this, and also traditional
environments put explicitly-initialized data in the data section
(which uses space on disk) while implicitly initialized are in the bss
section (backed by the copy-on-write zero page). Modern gcc puts both
in bss by default, which is stupid because it does nothing useful for
correct code (without explicit initialization) and breaks some
traditional systems-level code (nonportable of course) which depends
on the data/bss distinction.
> That being said, the reason for the patch was I was also experiencing
> somewhat erratic initialization with mingw32 (but when mixing it with
> msvc). I'll probably keep doing some more testing as I hunt for the
> problem I'm seeing with ff_cropTbl.
Probably mingw has a bug with bss. Changing individual initializers is
NOT the way to fix this; there are thousands. Also modern gcc will
move them all back to bss for you anyway, I suspect...
More information about the ffmpeg-devel