mpeg4videodec: simplify mpeg4_decode_profile_level()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 14 years ago
parent 9c2651ab44
commit 52e24c7d7e
  1. 7
      libavcodec/mpeg4videodec.c

@ -1528,12 +1528,9 @@ static int mpeg4_decode_gop_header(MpegEncContext * s, GetBitContext *gb){
} }
static int mpeg4_decode_profile_level(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 = get_bits(gb, 4);
s->avctx->level = get_bits(gb, 4);
s->avctx->profile = (profile_and_level_indication & 0xf0) >> 4;
s->avctx->level = (profile_and_level_indication & 0x0f);
// for Simple profile, level 0 // for Simple profile, level 0
if (s->avctx->profile == 0 && s->avctx->level == 8) { if (s->avctx->profile == 0 && s->avctx->level == 8) {

Loading…
Cancel
Save