From 863679d878202496a7a61205d373e0a27d21db7e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Wed, 26 Dec 2012 09:58:18 +0100 Subject: [PATCH] Use new MLT names for audio frequency/channels, fixes broken audio thumbs --- src/renderer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) { -- 2.39.2