[MPlayer-dev-eng] [PATCH] libmpcodecs/vd_ffmpeg.c compile problem
r_togni at tiscali.it
Tue Nov 11 20:45:32 CET 2003
On 2003.11.11 14:08, rgselk wrote:
> --- Roberto Togni <r_togni at tiscali.it> wrote:
> > On 2003.11.10 22:19, rgselk wrote:
> > > +#if LIBAVCODEC_BUILD >= 4689
> > > // Palette support: free palette buffer allocated in
> > > get_buffer
> > > if ((mpi->bpp == 8) && (mpi->planes != NULL))
> > > free(mpi->planes);
> > > -
> > > +#endif
> > This is not needed IMHO. There are no references to libavcodec
> > symbols.
> You are freeing data which was malloc'd within an #ifdef. If malloc
> within #ifdef, the free should be in the same kind of #ifdef.
You don't get there.
vd_ffmpeg will fail in init because of missing codec or in codec
because no palette is passed.
And even if you happen to reach thhat line, mpi is memzero'ed on
allocation, so the second part of the if will be false.
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
More information about the MPlayer-dev-eng