summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:09:53 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:33:13 (GMT)
commit5114fcb45d584ea50da7397088f084dfd74922b9 (patch)
tree18cb40f048186ebf0eac568e2ae53ec092044c55 /src/multimedia
parent55e47566dd1ac83ff674401dfd6284f07490cd8b (diff)
parentee62807198a2525577c14f718b98d07ae0ec7bec (diff)
downloadQt-5114fcb45d584ea50da7397088f084dfd74922b9.zip
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.gz
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp31
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp2
2 files changed, 18 insertions, 15 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index f663dd2..633b309 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -431,21 +431,24 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
while (*n != NULL) {
name = snd_device_name_get_hint(*n, "NAME");
- descr = snd_device_name_get_hint(*n, "DESC");
- io = snd_device_name_get_hint(*n, "IOID");
- if((name != NULL) && (descr != NULL) && ((io == NULL) || (io == filter))) {
- QString deviceName = QLatin1String(name);
- QString deviceDescription = QLatin1String(descr);
- allDevices.append(deviceName.toLocal8Bit().constData());
- if(deviceDescription.contains(QLatin1String("Default Audio Device")))
- devices.append(deviceName.toLocal8Bit().constData());
- }
- if(name != NULL)
+ if (name != 0 && qstrcmp(name, "null") != 0) {
+ descr = snd_device_name_get_hint(*n, "DESC");
+ io = snd_device_name_get_hint(*n, "IOID");
+
+ if ((descr != NULL) && ((io == NULL) || (io == filter))) {
+ QString deviceName = QLatin1String(name);
+ QString deviceDescription = QLatin1String(descr);
+ allDevices.append(deviceName.toLocal8Bit().constData());
+ if (deviceDescription.contains(QLatin1String("Default Audio Device")))
+ devices.append(deviceName.toLocal8Bit().constData());
+ }
+
free(name);
- if(descr != NULL)
- free(descr);
- if(io != NULL)
- free(io);
+ if (descr != NULL)
+ free(descr);
+ if (io != NULL)
+ free(io);
+ }
++n;
}
snd_device_name_free_hint(hints);
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 6cdf7c0..3ec40e8 100644
--- a/src/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
@@ -252,7 +252,7 @@ QVideoSurfaceFormat::~QVideoSurfaceFormat()
bool QVideoSurfaceFormat::isValid() const
{
- return d->pixelFormat == QVideoFrame::Format_Invalid && d->frameSize.isValid();
+ return d->pixelFormat != QVideoFrame::Format_Invalid && d->frameSize.isValid();
}
/*!