[FFmpeg-devel] [PATCH 09/11] mxg: fix compiler warning for uninitialized variables

Jean First jeanfirst at gmail.com
Fri Dec 30 21:08:06 CET 2011


Signed-off-by: Jean First <jeanfirst at gmail.com>
---
 libavformat/mxg.c   |    2 +-
 libavformat/rmdec.c |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index b249f67..af27910 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -98,7 +98,7 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
 {
     MXGContext *mxg = s->priv_data;
     unsigned int current_pos = mxg->buffer_ptr - mxg->buffer;
-    unsigned int soi_pos;
+    unsigned int soi_pos = 0;
     int ret;
 
     /* reallocate internal buffer */
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 7524023..58a9857 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -602,7 +602,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;
     int type;
 
     hdr = avio_r8(pb); len--;
@@ -844,7 +845,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;
     int i, len, res, seq = 1;
     int64_t timestamp, pos;
     int flags;
-- 
1.7.7.3



More information about the ffmpeg-devel mailing list