From 32149a362a4f95f38aaf88ea359880226ad3f5b6 Mon Sep 17 00:00:00 2001 From: jbrjake Date: Thu, 15 May 2008 20:23:03 +0000 Subject: [PATCH] CLI: Sample rates given by the user in kHz need to be converted to Hz for libhb. git-svn-id: svn://localhost/HandBrake/trunk@1460 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- test/test.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test.c b/test/test.c index 1731eddd..6c08ecd9 100644 --- a/test/test.c +++ b/test/test.c @@ -995,6 +995,17 @@ static int HandleEvents( hb_handle_t * h ) fprintf(stderr, "Invalid sample rate %d, using default\n", arate); arate = default_arate; } + + int j; + for( j = 0; j < hb_audio_rates_count; j++ ) + { + if( !strcmp( token, hb_audio_rates[j].string ) ) + { + arate = hb_audio_rates[j].rate; + break; + } + } + audio->out.samplerate = arate; } if( (++i) >= num_audio_tracks ) -- 2.11.0