From: Jean-Baptiste Mardelle Date: Sun, 30 Dec 2012 14:46:01 +0000 (+0100) Subject: Merge branch 'master' of git://anongit.kde.org/kdenlive X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=263f5cbe3f8129f22ff3018207b16970361c7538;hp=d1b381124300c1a51a571d1a73e50dae772f58bc;p=kdenlive Merge branch 'master' of git://anongit.kde.org/kdenlive --- diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp index 8eea860b..83e34849 100644 --- a/src/clipmanager.cpp +++ b/src/clipmanager.cpp @@ -264,12 +264,14 @@ void ClipManager::slotGetAudioThumbs() if (hash.isEmpty()) continue; QString audioPath = projectFolder() + "/thumbs/" + hash + ".thumb"; double lengthInFrames = clip->duration().frames(m_doc->fps()); - int frequency = 48000; - int channels = 2; + int frequency = 0; + int channels = 0; QString data = clip->getProperty("frequency"); if (!data.isEmpty()) frequency = data.toInt(); + if (frequency <= 0) frequency = 48000; data = clip->getProperty("channels"); if (!data.isEmpty()) channels = data.toInt(); + if (channels <= 0) channels = 2; int arrayWidth = 20; double frame = 0.0; int maxVolume = 0; diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp index 35304225..6f5de9ec 100644 --- a/src/recmonitor.cpp +++ b/src/recmonitor.cpp @@ -386,6 +386,7 @@ void RecMonitor::slotStopCapture() if (!m_isCapturing && !m_isPlaying) return; videoBox->setHidden(true); control_frame->setEnabled(true); + slotActivateMonitor(); switch (device_selector->currentIndex()) { case FIREWIRE: m_captureProcess->write("\e", 2); @@ -597,7 +598,7 @@ void RecMonitor::slotRecord() switch (device_selector->currentIndex()) { case VIDEO4LINUX: - slotActivateMonitor(); + if (rec_video->isChecked()) slotActivateMonitor(); path = KStandardDirs::locateLocal("appdata", "profiles/video4linux"); profile = ProfilesDialog::getVideoProfile(path); //m_videoBox->setRatio((double) profile.display_aspect_num / profile.display_aspect_den); diff --git a/src/renderer.cpp b/src/renderer.cpp index 6ba456ff..64ed4da9 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -990,8 +990,8 @@ void Render::processFileProperties() // keep for compatibility with MLT <= 0.8.6 if (af == 0) af = frame->get_int("frequency"); if (ac == 0) ac = frame->get_int("channels"); - filePropertyMap["frequency"] = QString::number(af); - filePropertyMap["channels"] = QString::number(ac); + if (af > 0) filePropertyMap["frequency"] = QString::number(af); + if (ac > 0) filePropertyMap["channels"] = QString::number(ac); if (!filePropertyMap.contains("aspect_ratio")) filePropertyMap["aspect_ratio"] = frame->get("aspect_ratio"); if (frame->get_int("test_image") == 0) { @@ -1562,8 +1562,9 @@ void Render::stop() m_refreshTimer.stop(); QMutexLocker locker(&m_mutex); if (m_mltProducer == NULL) return; - if (m_mltConsumer && !m_mltConsumer->is_stopped()) { - m_mltConsumer->stop(); + if (m_mltConsumer) { + m_mltConsumer->set("refresh", 0); + if (!m_mltConsumer->is_stopped()) m_mltConsumer->stop(); m_mltConsumer->purge(); }