ffmpeg | branch: release/2.4 | Michael Niedermayer <michae...@gmx.at> | Sat Mar 
 7 15:11:39 2015 +0100| [ee820d05127343a14f056b1ca0aec5f9f7db6a38] | committer: 
Michael Niedermayer

avcodec/opusdec: Clear out pointers per packet

This is safer than to assume that all error pathes cleared them and
nothing will use uncleared pointers.

Signed-off-by: Michael Niedermayer <michae...@gmx.at>
(cherry picked from commit 1ae092587fc196da5098dea346d7ece81ec35153)

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

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

 libavcodec/opusdec.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 3ce519d..bd27ec5 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -452,6 +452,12 @@ static int opus_decode_packet(AVCodecContext *avctx, void 
*data,
     int decoded_samples = 0;
     int i, ret;
 
+    for (i = 0; i < c->nb_streams; i++) {
+        OpusStreamContext *s = &c->streams[i];
+        s->out[0] =
+        s->out[1] = NULL;
+    }
+
     /* decode the header of the first sub-packet to find out the sample count 
*/
     if (buf) {
         OpusPacket *pkt = &c->streams[0].packet;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to