Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/gstreamer/audiooutput.cpp

    r2 r561  
    4343    m_name = "AudioOutput" + QString::number(count++);
    4444    if (m_backend->isValid()) {
    45         g_set_application_name(qApp->applicationName().toUtf8());
    4645        m_audioBin = gst_bin_new (NULL);
    4746        gst_object_ref (GST_OBJECT (m_audioBin));
     
    138137    bool success = false;
    139138    const QList<AudioDevice> deviceList = m_backend->deviceManager()->audioOutputDevices();
    140     if (m_audioSink &&  newDevice >= 0 && newDevice < deviceList.size()) {
     139    int deviceIdx = -1;
     140    for (int i=0; i<deviceList.size(); i++) {
     141        if (deviceList.at(i).id == newDevice) {
     142            deviceIdx = i;
     143            break;
     144        }
     145    }
     146
     147    if (m_audioSink && deviceIdx >= 0) {
    141148        // Save previous state
    142149        GstState oldState = GST_STATE(m_audioSink);
    143150        const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device");
    144         const QByteArray deviceId = deviceList.at(newDevice).gstId;
     151        const QByteArray deviceId = deviceList.at(deviceIdx).gstId;
    145152        m_device = newDevice;
    146153
Note: See TracChangeset for help on using the changeset viewer.