From: Jean-Baptiste Mardelle Date: Wed, 26 Dec 2012 08:58:18 +0000 (+0100) Subject: Use new MLT names for audio frequency/channels, fixes broken audio thumbs X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=863679d878202496a7a61205d373e0a27d21db7e;p=kdenlive Use new MLT names for audio frequency/channels, fixes broken audio thumbs --- diff --git a/src/renderer.cpp b/src/renderer.cpp index 4d146bf5..0d104aa2 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -984,8 +984,13 @@ void Render::processFileProperties() Mlt::Frame *frame = producer->get_frame(); if (frame && frame->is_valid()) { filePropertyMap["frame_size"] = QString::number(frame->get_int("width")) + 'x' + QString::number(frame->get_int("height")); - filePropertyMap["frequency"] = QString::number(frame->get_int("frequency")); - filePropertyMap["channels"] = QString::number(frame->get_int("channels")); + int af = frame->get_int("audio_frequency"); + int ac = frame->get_int("audio_channels"); + // 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 (!filePropertyMap.contains("aspect_ratio")) filePropertyMap["aspect_ratio"] = frame->get("aspect_ratio"); if (frame->get_int("test_image") == 0) {