[vlc-devel] "equalizer-bands" corrupt/truncated occasionally

akash mehrotra mehrotra.akash at gmail.com
Fri Jun 17 19:48:35 CEST 2011


2011/6/17 Rémi Denis-Courmont <remi at remlab.net>

> On Fri, 17 Jun 2011 16:09:08 +0530, akash mehrotra
> <mehrotra.akash at gmail.com> wrote:
> > I'm not very sure, but the corruption seems to be happening in this
> line:
> >     const char *psz_values = values.toAscii().constData();
> >
> > the length of "values" is correct till just before this, but after
> > conversion, psz_values is often shorter than it should be
>
> QString::toAscii() creates a temporary anonymous object, which is garbage
> collected at the end of the statement, is that right? I wrote many times
> not to assign char pointers to temporary QString's...
>
> Yes, this line seems to be the issue, as printf("%s\n",(const char
*)values.toAscii()); always gives the correct output.

What would you suggest as a replacement?

> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> 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/20110617/4b005a61/attachment.html>


More information about the vlc-devel mailing list