[MPlayer-dev-eng] [PATCH] Libass BOM fix

Ivan Kalvachev ikalvachev at gmail.com
Sat Oct 27 21:22:22 CEST 2007


2007/10/27, Ulion <ulion2002 at gmail.com>:
> 2007/10/27, Ivan Kalvachev <ikalvachev at gmail.com>:
> > 2007/10/27, Ulion <ulion2002 at gmail.com>:
> > > 2007/10/27, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > > > Hello,
> > > > On Sat, Oct 27, 2007 at 10:01:29PM +0800, Ulion wrote:
> > > > > A memory leak bug found in sub_recode, my fix is here:
> > > >
> > > > Better don't send patches for new issues as replies.
> > > > Also if you send them inline take care your mailer doesn't wrap lines.
> > >
> > > Sorry for that. I sent it inline to be noticed directly, it's just a
> > > notifaction.
> > >
> > > > And attached patch seems simpler (and would allow to remove the later
> > > > #ifdef HAVE_ENCA).
> > > > Note that it is untested though.
> > >
> > > Your one is simper for resolve this little leak.
> > > But as ivan suggested, maybe we should get rid of all strdup stuff for
> > > enca, I think we should wait for his patch.
> >
> > Here it is.
> > Have in mind there is something fishy with it. It compiled and run
> > from the first time.
> > According to Murphy's law, it means that the concept is flowed. ;)
> >
>
> Variable tmp may removed since it's not used any more.

It is used.
The ENCS_CS_UNKNOWN is valid to enca_charset_name() and it won't
return NULL. (at least this is how I understand
http://trific.ath.cx/software/enca/libenca/libenca-Charsets-and-Surfaces/#enca-charset-name
 )

Of course I can move the check before the enca_charset_name(), but
then I'd have to check for NULL again later, probably at the end
(using the else).
This clean up is not really related to the strdup removal, so I prefer
to do it in 2 steps.
First the patch I posted earlier and then the clean-up variable patch
I attach now.

If nobody objects, I'll commit both patches tomorrow.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enca_tmp_clean.patch
Type: application/octet-stream
Size: 1199 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071027/bd23afce/attachment.obj>


More information about the MPlayer-dev-eng mailing list