On Tue, Jul 05, 2011 at 03:27:05PM +0100, Måns Rullgård wrote: > Clément Bœsch <[email protected]> writes: > > > + put_bits32(&pb, 0); // padding must be zero'ed > > Since you seem to care about comments, it may interest you that "zeroed" > is correct English. The apostrophe does not belong there. >
Oups, sorry about that. Re-attached. -- Clément B.
From 33c44851bf544b2d60cc8dbd107375db8b128601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <[email protected]> Date: Tue, 5 Jul 2011 16:02:56 +0200 Subject: [PATCH 2/2] dv: fix valgrind use of uninitialised value warnings. --- libavcodec/dv.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/dv.c b/libavcodec/dv.c index b6f7852..2dc0373 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -475,8 +475,8 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) GetBitContext gb; BlockInfo mb_data[5 * DV_MAX_BPM], *mb, *mb1; LOCAL_ALIGNED_16(DCTELEM, sblock, [5*DV_MAX_BPM], [64]); - LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [80 + 4]); /* allow some slack */ - LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [5 * 80 + 4]); /* allow some slack */ + LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [ 80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ + LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [5*80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ const int log2_blocksize = 3-s->avctx->lowres; int is_field_mode[5]; @@ -543,6 +543,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) block = block1; mb = mb1; init_get_bits(&gb, mb_bit_buffer, put_bits_count(&pb)); + put_bits32(&pb, 0); // padding must be zeroed flush_put_bits(&pb); for (j = 0; j < s->sys->bpm; j++, block += 64, mb++) { if (mb->pos < 64 && get_bits_left(&gb) > 0) { @@ -563,6 +564,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) block = &sblock[0][0]; mb = mb_data; init_get_bits(&gb, vs_bit_buffer, put_bits_count(&vs_pb)); + put_bits32(&vs_pb, 0); // padding must be zeroed flush_put_bits(&vs_pb); for (mb_index = 0; mb_index < 5; mb_index++) { for (j = 0; j < s->sys->bpm; j++) { -- 1.7.5.4
pgp3AhhVQElSL.pgp
Description: PGP signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
