[vlc-commits] vdpau: use profile and level from AVCodecContext

Rémi Denis-Courmont git at videolan.org
Thu Apr 23 17:38:34 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 23 18:36:36 2015 +0300| [7fccfc99071bb45d33f64be3ac0c95c6203c1fb2] | committer: Rémi Denis-Courmont

vdpau: use profile and level from AVCodecContext

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

 modules/hw/vdpau/avcodec.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 8022122..525e81e 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -258,12 +258,12 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const es_format_t *fmt)
     VdpStatus err;
 #if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 2, 0))
     VdpDecoderProfile profile;
-    int level = fmt->i_level;
+    int level = avctx->level;
 
     if (av_vdpau_get_profile(avctx, &profile))
     {
         msg_Err(va, "unsupported codec %d or profile %d", avctx->codec_id,
-                fmt->i_profile);
+                avctx->profile);
         return VLC_EGENERIC;
     }
 
@@ -279,8 +279,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const es_format_t *fmt)
             level = VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5;
             break;
         case AV_CODEC_ID_H264:
-            if ((fmt->i_profile & FF_PROFILE_H264_INTRA)
-             && (fmt->i_level == 11))
+            if ((avctx->profile & FF_PROFILE_H264_INTRA) && level == 11)
                 level = VDP_DECODER_LEVEL_H264_1b;
         default:
             break;



More information about the vlc-commits mailing list