flvdec: avoid unitialized use of a struct member
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 20 Oct 2014 11:56:42 +0000 (12:56 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 21 Oct 2014 13:37:48 +0000 (14:37 +0100)
CC: libav-stable@libav.org
Bug-Id: CID 718141

libavformat/flvdec.c

index 56c932c..1c92cc5 100644 (file)
@@ -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;
         }