[vlc-commits] commit: x264: don't set default level to 5.1, but let libx264 pick level by default. (Ilkka Ollakka )

git at videolan.org git at videolan.org
Thu Apr 1 13:31:02 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Mar 30 17:27:32 2010 +0300| [ff3ddd93ab02347c34835c109fd413a5567a89fb] | committer: Ilkka Ollakka 

x264: don't set default level to 5.1, but let libx264 pick level by default.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff3ddd93ab02347c34835c109fd413a5567a89fb
---

 modules/codec/x264.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index ec79dae..4606ab2 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -466,7 +466,7 @@ vlc_module_begin ()
 
     add_bool( SOUT_CFG_PREFIX "psy", true, NULL, PSY_TEXT, PSY_LONGTEXT, false )
 
-    add_string( SOUT_CFG_PREFIX "level", "5.1", NULL, LEVEL_TEXT,
+    add_string( SOUT_CFG_PREFIX "level", "0", NULL, LEVEL_TEXT,
                LEVEL_LONGTEXT, false )
 
     add_string( SOUT_CFG_PREFIX "profile", "high", NULL, PROFILE_TEXT,
@@ -841,10 +841,10 @@ static int  Open ( vlc_object_t *p_this )
     psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "level" );
     if( psz_val )
     {
-        if( us_atof (psz_val) < 6 )
+        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
+        else if( atoi(psz_val) > 0 )
             p_sys->param.i_level_idc = atoi (psz_val);
         free( psz_val );
     }



More information about the vlc-commits mailing list