diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-14 15:08:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-14 15:30:39 +0200 |
commit | 37d93fdbf0fec0eac885974c01fba99826ae7763 (patch) | |
tree | 248aa49e8138936bcd3567bd50abdaaa207e42f4 | |
parent | 343f34c0b8f4cf8e6bfa429d7c190158b03c4fe8 (diff) | |
download | ffmpeg-37d93fdbf0fec0eac885974c01fba99826ae7763.tar.gz |
avcodec/mpeg12dec: Use check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpeg12dec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index a5622bf19e..285f45db6b 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -831,7 +831,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) s->last_mv[0][1][1] = mpeg_decode_motion(s, s->mpeg_f_code[0][1], s->last_mv[0][0][1]); - skip_bits1(&s->gb); /* marker */ + check_marker(&s->gb, "after concealment_motion_vectors"); } else { /* reset mv prediction */ memset(s->last_mv, 0, sizeof(s->last_mv)); @@ -1451,7 +1451,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) s->height |= (vert_size_ext << 12); bit_rate_ext = get_bits(&s->gb, 12); /* XXX: handle it */ s->bit_rate += (bit_rate_ext << 18) * 400; - skip_bits1(&s->gb); /* marker */ + check_marker(&s->gb, "after bit rate extension"); s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10; s->low_delay = get_bits1(&s->gb); @@ -2131,8 +2131,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, s->frame_rate_index = 1; } s->bit_rate = get_bits(&s->gb, 18) * 400; - if (get_bits1(&s->gb) == 0) { /* marker */ - av_log(avctx, AV_LOG_ERROR, "Marker in sequence header missing\n"); + if (check_marker(&s->gb, "in sequence header") == 0) { return AVERROR_INVALIDDATA; } s->width = width; |