[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [qtopenal] src: Return QByteArray() if something went wrong during
From:       Laszlo Papp <ext-laszlo.papp () nokia ! com>
Date:       2011-11-30 23:53:01
Message-ID: 20111130235301.7433EA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 60986372f3bd02fd8125873497e4094e6a577c30 by Laszlo Papp.
Committed on 01/12/2011 at 02:17.
Pushed by lpapp into branch 'master'.

Return QByteArray() if something went wrong during the decoding

M  +3    -1    src/qalsndaudiodecoder.cpp

http://commits.kde.org/qtopenal/60986372f3bd02fd8125873497e4094e6a577c30

diff --git a/src/qalsndaudiodecoder.cpp b/src/qalsndaudiodecoder.cpp
index bb23b66..9eed040 100644
--- a/src/qalsndaudiodecoder.cpp
+++ b/src/qalsndaudiodecoder.cpp
@@ -211,8 +211,10 @@ QALSndAudioDecoder::decode(qint64 maxlen)
 
     char *decodedData = result.data();
 
-    if (maxlen != decode(decodedData, maxlen))
+    if (maxlen != decode(decodedData, maxlen)) {
         qWarning() << Q_FUNC_INFO << "Could not to decode all the data:" << maxlen;
+        return QByteArray();
+    }
 
     return result;
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic