[vlc-devel] "equalizer-bands" corrupt/truncated occasionally
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
> > 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
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel