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

Rich Felker dalias at aerifal.cx
Sun May 14 22:37:12 CEST 2006


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?

Rich




More information about the MPlayer-dev-eng mailing list