[libav-stable] flvdec: avoid unitialized use of a struct member

Vittorio Giovara git at libav.org
Tue Oct 21 16:05:59 CEST 2014


Module: libav
Branch: master
Commit: f22aa6b841dc54fa1dd804303885b1e230a5f629

Author:    Vittorio Giovara <vittorio.giovara at gmail.com>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Mon Oct 20 12:56:42 2014 +0100

flvdec: avoid unitialized use of a struct member

CC: libav-stable at libav.org
Bug-Id: CID 718141

---

 libavformat/flvdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 56c932c..1c92cc5 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -879,6 +879,7 @@ skip:
         } else {
             AVCodecContext ctx;
             ctx.sample_rate = sample_rate;
+            ctx.bits_per_coded_sample = bits_per_coded_sample;
             flv_set_audio_codec(s, st, &ctx, flags & FLV_AUDIO_CODECID_MASK);
             sample_rate = ctx.sample_rate;
         }



More information about the libav-stable mailing list