]> git.sesse.net Git - ffmpeg/commitdiff
mpeg4videodec: simplify mpeg4_decode_profile_level()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Jul 2011 14:21:37 +0000 (16:21 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Jul 2011 14:21:37 +0000 (16:21 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg4videodec.c

index b983a44855622c70d57603b9551a3c38c69db677..b44f2f08034eb1dbe30abd0e7830d33d00c46886 100644 (file)
@@ -1528,12 +1528,9 @@ static int mpeg4_decode_gop_header(MpegEncContext * s, GetBitContext *gb){
 }
 
 static int mpeg4_decode_profile_level(MpegEncContext * s, GetBitContext *gb){
-  int profile_and_level_indication;
 
-  profile_and_level_indication = get_bits(gb, 8);
-
-  s->avctx->profile = (profile_and_level_indication & 0xf0) >> 4;
-  s->avctx->level   = (profile_and_level_indication & 0x0f);
+  s->avctx->profile = get_bits(gb, 4);
+  s->avctx->level   = get_bits(gb, 4);
 
   // for Simple profile, level 0
   if (s->avctx->profile == 0 && s->avctx->level == 8) {