OSDN Git Service

cli: fix misleading error messag
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 9 Oct 2010 20:20:40 +0000 (20:20 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
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://localhost/HandBrake/trunk@3590 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 019bdb0..14046cf 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);