[vlc-devel] [PATCH] Luahttp can access equalizer settings

akash mehrotra mehrotra.akash at gmail.com
Mon Jun 20 21:08:12 CEST 2011

Fixed and new patch attached..

It seems someone else fixed the corruption problem while I was working on
the equalizer, so the check is not needed now.

On Mon, Jun 20, 2011 at 9:32 PM, Michael Karcher <
Michael.Karcher at fu-berlin.de> wrote:

> Am Montag, den 20.06.2011, 19:00 +0530 schrieb akash mehrotra:
> >
> http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110618/b2d51c5e/attachment.obj
> >
> > would have fixed it, but since it was not accepted, I'm using this
> > hack till the time I can learn Qt enough to fix the problem without
> > the use of STL
> Ah, that's easy. The problem is, as you were told, that the expression
> values.toAscii().constData() contains the creation of a QByteArray
> object that contains the ascii version. As this object (returned by
> toAscii(), consumed as "this" by constData() ) is not bound to any
> variable, it gets destroyed as soon as the compiler finishes evalution
> of "values.toAscii().constData()", which leaves you with a dangling
> pointer. Create a named QByteArray instead. It will live until it gets
> out of scope, like in
>  QByteArray arr = values.toAscii();
>  const char * psz_values = arr.constData();
> (not compile tested, but you get the idea)
> Regards,
>   Michael Karcher
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110621/761ef8eb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-luahttp-can-access-and-modify-equalizer-bands.patch
Type: application/octet-stream
Size: 5814 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110621/761ef8eb/attachment.obj>

More information about the vlc-devel mailing list