[FFmpeg-devel] [PATCH 07/12] avradio/avformat/sdrdemux: Avoid uninitialized memory on mono -> stereo switch
Michael Niedermayer
michael at niedermayer.cc
Mon Jul 31 01:11:26 EEST 2023
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/sdrdemux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/sdrdemux.c b/libavformat/sdrdemux.c
index 69349add7b..8f0f4657f3 100644
--- a/libavformat/sdrdemux.c
+++ b/libavformat/sdrdemux.c
@@ -1150,6 +1150,8 @@ static int demodulate_fm(SDRContext *sdr, Station *station, AVStream *st, AVPack
sst->out_buf[2*i+0] = m + q;
sst->out_buf[2*i+1] = m - q;
} else {
+ newbuf[2*i+1] = 0;
+
sst->out_buf[2*i+0] =
sst->out_buf[2*i+1] = m;
}
--
2.31.1
More information about the ffmpeg-devel
mailing list