[FFmpeg-cvslog] rmdec: fix compiler warning for uninitialized variables

Jean First git at videolan.org
Wed Dec 26 00:01:00 CET 2012


ffmpeg | branch: master | Jean First <jeanfirst at gmail.com> | Sat Dec 31 14:15:35 2011 +0100| [7fc73d9ab781f66b63f3bbe2f384f4f639ae78e9] | committer: Michael Niedermayer

rmdec: fix compiler warning for uninitialized variables

Signed-off-by: Jean First <jeanfirst at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/rmdec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 0852720..3b476ff 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -658,7 +658,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
                                    AVPacket *pkt, int len, int *pseq,
                                    int64_t *timestamp)
 {
-    int hdr, seq, pic_num, len2, pos;
+    int hdr;
+    int seq = 0, pic_num = 0, len2 = 0, pos = 0; //init to silcense compiler warning
     int type;
 
     hdr = avio_r8(pb); len--;
@@ -874,7 +875,7 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
 static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     RMDemuxContext *rm = s->priv_data;
-    AVStream *st;
+    AVStream *st = NULL; // init to silence compiler warning
     int i, len, res, seq = 1;
     int64_t timestamp, pos;
     int flags;



More information about the ffmpeg-cvslog mailing list