[FFmpeg-devel] [PATCH 12/12] rmdec: fix compiler warning for uninitialized variables

Jean First jeanfirst at gmail.com
Sat Dec 31 14:15:35 CET 2011


I let you decide if it is performance relevant or not.

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

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