diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-17 00:15:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-17 00:21:58 +0100 |
commit | 765a3ba0187bbd72cdea842fb8d2516048c8aa31 (patch) | |
tree | 3b61d0a4a5ddc5332a679481307e0297dea094f4 | |
parent | 97d190283ee233e32b805e57434adfac64dabc17 (diff) | |
download | ffmpeg-765a3ba0187bbd72cdea842fb8d2516048c8aa31.tar.gz |
h264: add assert to check that block_offset is consistent.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3ad6b2a8ea..db1e5d9e28 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3727,6 +3727,8 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) s->mb_skip_run = -1; + av_assert0(h->block_offset[15] == (4 * ((scan8[15] - scan8[0]) & 7) << h->pixel_shift) + 4 * s->linesize * ((scan8[15] - scan8[0]) >> 3)); + h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME || s->codec_id != AV_CODEC_ID_H264 || (CONFIG_GRAY && (s->flags & CODEC_FLAG_GRAY)); |