[FFmpeg-cvslog] atrac3plus: Add forgotten initialization of an internal struct

Maxim Poliakovski git at videolan.org
Thu Jan 2 02:30:12 CET 2014


ffmpeg | branch: master | Maxim Poliakovski <max_pole at gmx.de> | Wed Jan  1 23:25:15 2014 +0100| [4663a550f584d4438b4d511373a91116f84079d7] | committer: Michael Niedermayer

atrac3plus: Add forgotten initialization of an internal struct

This patch also fixes trac ticket 3254.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4663a550f584d4438b4d511373a91116f84079d7
---

 libavcodec/atrac3plus.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c
index 8bb1c60..25c4f76 100644
--- a/libavcodec/atrac3plus.c
+++ b/libavcodec/atrac3plus.c
@@ -1700,6 +1700,10 @@ static int decode_tones_info(GetBitContext *gb, Atrac3pChanUnitCtx *ctx,
     int ch_num, i, ret;
     int band_has_tones[16];
 
+    for (ch_num = 0; ch_num < num_channels; ch_num++)
+        memset(ctx->channels[ch_num].tones_info, 0,
+               sizeof(*ctx->channels[ch_num].tones_info) * ATRAC3P_SUBBANDS);
+
     ctx->waves_info->tones_present = get_bits1(gb);
     if (!ctx->waves_info->tones_present)
         return 0;



More information about the ffmpeg-cvslog mailing list