[FFmpeg-cvslog] h264: add assert to check that block_offset is consistent.
Michael Niedermayer
git at videolan.org
Thu Jan 17 00:23:01 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jan 17 00:15:33 2013 +0100| [765a3ba0187bbd72cdea842fb8d2516048c8aa31] | committer: Michael Niedermayer
h264: add assert to check that block_offset is consistent.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=765a3ba0187bbd72cdea842fb8d2516048c8aa31
---
libavcodec/h264.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3ad6b2a..db1e5d9 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));
More information about the ffmpeg-cvslog
mailing list