[MPlayer-dev-eng] [PATCH] libmpcodecs/vd_ffmpeg.c compile problem
Roberto Togni
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[1] != NULL))
> > > free(mpi->planes[1]);
> > > -
> > > +#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
> is
> 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.
> Regards,
> rgselk.
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
More information about the MPlayer-dev-eng
mailing list