[FFmpeg-cvslog] v210dec: Fix warning: ‘val’ may be use =?UTF-8?Q?d=20uninitialized=20in=20th?==?UTF-8?Q?is=20function=20?=[ -Wuninitialized]

Michael Niedermayer git at videolan.org
Sun Dec 18 01:22:44 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 18 01:06:07 2011 +0100| [53509d20cac1f9c4bb7e746f36e25d6fc66ae31b] | committer: Michael Niedermayer

v210dec: Fix warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]

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

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

 libavcodec/v210dec.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 147f1f2..1af7f94 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -126,14 +126,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
 
             val  = av_le2ne32(*src++);
             *y++ =  val & 0x3FF;
-        }
-        if (w < avctx->width - 3) {
-            *u++ = (val >> 10) & 0x3FF;
-            *y++ = (val >> 20) & 0x3FF;
-
-            val  = av_le2ne32(*src++);
-            *v++ =  val & 0x3FF;
-            *y++ = (val >> 10) & 0x3FF;
+            if (w < avctx->width - 3) {
+                *u++ = (val >> 10) & 0x3FF;
+                *y++ = (val >> 20) & 0x3FF;
+
+                val  = av_le2ne32(*src++);
+                *v++ =  val & 0x3FF;
+                *y++ = (val >> 10) & 0x3FF;
+            }
         }
 
         psrc += stride;



More information about the ffmpeg-cvslog mailing list