[FFmpeg-cvslog] avcodec/mjpegdec: zero gb to silence warning about it being possibly uninitialized
Michael Niedermayer
git at videolan.org
Thu May 8 17:44:22 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu May 8 17:36:50 2014 +0200| [aff352be6339d9a3512bd5c1b65772b36c5204ee] | committer: Michael Niedermayer
avcodec/mjpegdec: zero gb to silence warning about it being possibly uninitialized
The code is not speed relevant, also its more robust if the pointers are NULL instead of random.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aff352be6339d9a3512bd5c1b65772b36c5204ee
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1aaddd1..7150d4a 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1153,7 +1153,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
uint8_t *data[MAX_COMPONENTS];
const uint8_t *reference_data[MAX_COMPONENTS];
int linesize[MAX_COMPONENTS];
- GetBitContext mb_bitmask_gb;
+ GetBitContext mb_bitmask_gb = {0}; // initialize to silence gcc warning
int bytes_per_pixel = 1 + (s->bits > 8);
if (mb_bitmask) {
More information about the ffmpeg-cvslog
mailing list