[vlc-devel] "equalizer-bands" corrupt/truncated occasionally
Rémi Denis-Courmont
remi at remlab.net
Fri Jun 17 13:36:01 CEST 2011
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...
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list