[FFmpeg-cvslog] flvdec: Fix compiler warning for uninitialized variables

Jean First git at videolan.org
Thu Jan 5 02:18:55 CET 2012


ffmpeg | branch: master | Jean First <jeanfirst at gmail.com> | Fri Dec 30 21:08:02 2011 +0100| [2df73eefb4f7c954d2bb80afa823bb7d4f8e5006] | committer: Martin Storsjö

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>

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

 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 ffmpeg-cvslog mailing list