[libav-commits] flvdec: Fix compiler warning for uninitialized variables

Jean First git at libav.org
Wed Jan 4 21:16:58 CET 2012


Module: libav
Branch: master
Commit: 2df73eefb4f7c954d2bb80afa823bb7d4f8e5006

Author:    Jean First <jeanfirst at gmail.com>
Committer: Martin Storsjö <martin at martin.st>
Date:      Fri Dec 30 21:08:02 2011 +0100

flvdec: Fix compiler warning for uninitialized variables

These can't be used uninitialized in practice, but the
compiler doesn't realize it.

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavformat/flvdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 4f1c805..2f770b3 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -441,7 +441,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
     int ret, i, type, size, flags, is_audio;
     int64_t next, pos;
     int64_t dts, pts = AV_NOPTS_VALUE;
-    int sample_rate, channels;
+    int sample_rate = 0, channels = 0;
     AVStream *st = NULL;
 
  for(;;avio_skip(s->pb, 4)){ /* pkt size is repeated at end. skip it */



More information about the libav-commits mailing list