[MPlayer-dev-eng] [PATCH] avoid code duplication in demux_{mov, ts, ogg}

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun May 14 23:57:07 CEST 2006


On Sunday, 14 May 2006 at 22:37, Rich Felker wrote:
> On Sun, May 14, 2006 at 12:12:15PM +0200, Dominik 'Rathann' Mierzejewski wrote:
> > On Sunday, 14 May 2006 at 01:27, Reimar Döffinger wrote:
> > > Hi,
> > > On Sat, May 13, 2006 at 11:08:49PM +0200, Dominik 'Rathann' Mierzejewski wrote:
> > > > Quick&dirty patch to move the realloc_struct code to a common place.
> > > > Fixes code duplication and a warning in demux_ogg. A better place
> > > > would probably be libavutil or maybe osdep/?
> > > 
> > > Which warning in demux_ogg? It probably happens because the 'static' was
> > > forgotten for that function...
> > 
> > No, demux_ogg doesn't even have this function defined, so gcc complains
> > about implicit declaration, but in demux_mov it isn't static, so that's
> > what gets used eventually. If it were static in demux_mov, I think linking
> > would fail with undefined reference to realloc_struct.
> 
> The patches I submitted to -security list had this function (as
> static) in demuxer.h along with all the other demuxer helper
> functions. Is this place bad?

Seems like the closest safe place until we decide to move (or not) all
similar helper functions elsewhere. See my original patch at the beginning
of this thread.

Regards,
R.

PS. I'm not subscribed to -security, so I never saw your patch.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan




More information about the MPlayer-dev-eng mailing list