[FFmpeg-cvslog] motionpixels/mp_decode_frame_helper: assert that the first pixel doesnt reuse the last.
Michael Niedermayer
git at videolan.org
Fri Oct 19 01:48:02 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 19 01:20:27 2012 +0200| [05b0337025f629d0a6c6321147f06d0da5e32a62] | committer: Michael Niedermayer
motionpixels/mp_decode_frame_helper: assert that the first pixel doesnt reuse the last.
reusing the last would use uninitialized data, this should be
impossible currently, but better to check by assert.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05b0337025f629d0a6c6321147f06d0da5e32a62
---
libavcodec/motionpixels.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 471f63f..7366713 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -220,6 +220,8 @@ static void mp_decode_frame_helper(MotionPixelsContext *mp, GetBitContext *gb)
YuvPixel p;
int y, y0;
+ av_assert1(mp->changes_map[0]);
+
for (y = 0; y < mp->avctx->height; ++y) {
if (mp->changes_map[y * mp->avctx->width] != 0) {
memset(mp->gradient_scale, 1, sizeof(mp->gradient_scale));
More information about the ffmpeg-cvslog
mailing list