From b5d2bf1b4c371e1238419f5a4bca45bba7a9d7e9 Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Thu, 25 May 2017 16:22:36 +0200 Subject: Fix PAD insertion for MP2 Mono 56-96 kbps Since merging toolame-dab into ODR-AudioEnc, for MP2 Mono services with a bitrate between 56 and 96 kbps, only two ScF-CRC bytes were aligned although there shall be four. --- src/odr-audioenc.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 4da3419..724d09e 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -775,10 +775,6 @@ int main(int argc, char *argv[]) err = toolame_set_samplerate(sample_rate); } - if (err == 0) { - err = toolame_set_bitrate(bitrate); - } - if (err == 0) { err = toolame_set_psy_model(dab_psy_model); } @@ -800,6 +796,11 @@ int main(int argc, char *argv[]) err = toolame_set_channel_mode(dab_channel_mode); } + // setting the ScF-CRC len here depends on set sample rate/channel mode + if (err == 0) { + err = toolame_set_bitrate(bitrate); + } + if (err == 0) { err = toolame_set_pad(padlen); } -- cgit v1.2.3