[FFmpeg-cvslog] avcodec/jpeg2000dec: Initialize ret to avoid warning and make the code more robust

Michael Niedermayer git at videolan.org
Sat Sep 5 00:48:08 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep  5 00:33:59 2015 +0200| [a87ada53c39c983ad20c86983c3bedfd56e7e8eb] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Initialize ret to avoid warning and make the code more robust

"Fixes" CID1322361

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/jpeg2000dec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 8a803e7..a414dc1 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1303,7 +1303,8 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2
 
 static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile)
 {
-    int ret, i;
+    int ret = AVERROR_BUG;
+    int i;
     int tp_index = 0;
 
     s->bit_index = 8;



More information about the ffmpeg-cvslog mailing list