]> git.sesse.net Git - vlc/commitdiff
avcodec decoder: export profile/level at open
authorRafaël Carré <rafael.carre@gmail.com>
Fri, 29 Jan 2010 13:34:30 +0000 (14:34 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Fri, 29 Jan 2010 13:34:30 +0000 (14:34 +0100)
modules/codec/avcodec/avcodec.c

index 147d09dd7a2362efcabfa5b54895b46408cabc0e..afd173e1df625a4b1e736a47bed69a1c17c04caf 100644 (file)
@@ -321,7 +321,14 @@ static int OpenDecoder( vlc_object_t *p_this )
         i_result = VLC_EGENERIC;
     }
 
-    if( i_result == VLC_SUCCESS ) p_dec->p_sys->i_cat = i_cat;
+    if( i_result == VLC_SUCCESS )
+    {
+        p_dec->p_sys->i_cat = i_cat;
+        if( p_context->profile != FF_PROFILE_UNKNOWN)
+            p_dec->fmt_in.i_profile = p_context->profile;
+        if( p_context->level != FF_LEVEL_UNKNOWN)
+            p_dec->fmt_in.i_level = p_context->level;
+    }
 
     return i_result;
 }