]> granicus.if.org Git - handbrake/commitdiff
cli: fix misleading error messag
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 9 Oct 2010 20:20:40 +0000 (20:20 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 9 Oct 2010 20:20:40 +0000 (20:20 +0000)
When samplerate is "auto" we were printing,
"Invalid sample rate 0, using input rate 48000"

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3590 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 019bdb0ee085883458b14b0db2cb9cc17cc934dc..14046cf1d47237dd179af6e970ad370ef4b7ada4 100644 (file)
@@ -1600,6 +1600,10 @@ static int HandleEvents( hb_handle_t * h )
 
                     if( audio != NULL )
                     {
+                        if ( !strcasecmp( token, "auto" ) )
+                        {
+                            arate = audio->in.samplerate;
+                        }
                         if (!is_sample_rate_valid(arate))
                         {
                             fprintf(stderr, "Invalid sample rate %d, using input rate %d\n", arate, audio->in.samplerate);