[vlc-devel] [PATCH 3/3] subtitle-demux: fix memory leaks (fixes #11908)

Hannes Domani ssbssa at yahoo.de
Wed Sep 10 20:52:16 CEST 2014


Tristan Matthews <le.businessman at gmail.com> schrieb am 20:08 Mittwoch, 10.September 2014:
> On Wed, Sep 10, 2014 at 12:25 PM, Hannes Domani <ssbssa at yahoo.de> wrote:
> > Tristan Matthews <le.businessman at gmail.com> schrieb am 18:20 Mittwoch, 10.September 2014:
> >> On Wed, Sep 10, 2014 at 12:17 PM, Hannes Domani <ssbssa at yahoo.de> wrote:
> >> > Tristan Matthews <le.businessman at gmail.com> schrieb am 17:43 Mittwoch, 10.September 2014:
> >> >> >
> >> >> > But I still think asprintf() is a bad choice here.
> >> >>
> >> >> Have you profiled to see what kind of impact it has?
> >> >
> >> > On Windows, with the example of #11908 it originally
> >> > took more than 11 minutes to start playing.
> >> > With my changes it takes 3 seconds to start playing.
> >>
> >> Do you mean without asprintf or without the memory leak? I was asking
> >> about without asprintf.
> >
> > Yes, with asprintf -> 11 minutes.
> > Without asprintf -> 3 seconds.
>
> OK, would it be possible to refactor the allocation(s) out of the loop
> and only resize if needed?

Not sure how you mean that.
We don't know before how big the buffer needs to be.




More information about the vlc-devel mailing list