]> git.sesse.net Git - vlc/commitdiff
x264: actually check limit for level is told between 10 and 51
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 1 Apr 2010 11:52:32 +0000 (14:52 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 1 Apr 2010 11:52:32 +0000 (14:52 +0300)
modules/codec/x264.c

index 4606ab254dedb44eb8379683fabe98bca56cb9a5..1bc4214114db148fdf630ba91ba24e74c3a2cd08 100644 (file)
@@ -844,7 +844,7 @@ static int  Open ( vlc_object_t *p_this )
         if( us_atof (psz_val) < 6 && us_atof (psz_val) > 0 )
             p_sys->param.i_level_idc = (int) (10 * us_atof (psz_val)
                                               + .5);
-        else if( atoi(psz_val) > 0 )
+        else if( atoi(psz_val) >= 10 && atoi(psz_val) <= 51 )
             p_sys->param.i_level_idc = atoi (psz_val);
         free( psz_val );
     }