]> git.sesse.net Git - vlc/commitdiff
avcodec: pass profile and level to hardware acceleration
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 27 Apr 2013 11:00:25 +0000 (14:00 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 27 Apr 2013 11:06:22 +0000 (14:06 +0300)
modules/codec/avcodec/video.c

index 2b87f35c71724e0c7707c128d461c20fc3f6c4d9..4b427a44c0529ea3c1aaeb812382d63e3844a02d 100644 (file)
@@ -1143,6 +1143,13 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
     if( p_va != NULL )
         vlc_va_Delete( p_va );
 
+    /* Profile and level informations are needed now.
+     * TODO: avoid code duplication with avcodec.c */
+    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;
+
     p_va = vlc_va_New( VLC_OBJECT(p_dec), p_sys->i_codec_id, &p_dec->fmt_in );
     if( p_va != NULL )
     {