]> sigrok.org Git - pulseview.git/blobdiff - pv/session.cpp
Session: Allow an SR_DF_META packet to override the samplerate
[pulseview.git] / pv / session.cpp
index 6767951cf85961ea303d9fc6f830e8a7d9eb576d..4aba385b687d22ac8764da163b3f552792580682 100644 (file)
@@ -1048,15 +1048,10 @@ void Session::feed_in_meta(shared_ptr<Meta> meta)
        for (auto entry : meta->config()) {
                switch (entry.first->id()) {
                case SR_CONF_SAMPLERATE:
-                       // We can't rely on the header to always contain the sample rate,
-                       // so in case it's supplied via a meta packet, we use it.
-                       if (!cur_samplerate_)
-                               cur_samplerate_ = g_variant_get_uint64(entry.second.gobj());
-
-                       /// @todo handle samplerate changes
+                       cur_samplerate_ = g_variant_get_uint64(entry.second.gobj());
                        break;
                default:
-                       // Unknown metadata is not an error.
+                       qDebug() << "Received meta data key" << entry.first->id() << ", ignoring.";
                        break;
                }
        }