]> granicus.if.org Git - handbrake/commitdiff
CLI: Sample rates given by the user in kHz need to be converted to Hz for libhb.
authorjbrjake <jb.rubin@gmail.com>
Thu, 15 May 2008 20:23:03 +0000 (20:23 +0000)
committerjbrjake <jb.rubin@gmail.com>
Thu, 15 May 2008 20:23:03 +0000 (20:23 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1460 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 1731edddf488809922f75d1c2bced5f9d295f12b..6c08ecd9bc15006e1dd0040ae196eeb497d5aee7 100644 (file)
@@ -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 )