Module: libav
Branch: master
Commit: 29e2c8531096a5fb67079551564b4ab3f9acd8a6

Author:    Justin Ruggles <[email protected]>
Committer: Justin Ruggles <[email protected]>
Date:      Mon Feb 27 23:39:50 2012 -0500

nellymoserenc: zero any leftover packet bytes

fixes writing of uninitialized packet data

---

 libavcodec/nellymoserenc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 5848191..c0b1746 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -363,6 +363,7 @@ static void encode_block(NellyMoserEncodeContext *s, 
unsigned char *output, int
     }
 
     flush_put_bits(&pb);
+    memset(put_bits_ptr(&pb), 0, output + output_size - put_bits_ptr(&pb));
 }
 
 static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, 
void *data)

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to