[FFmpeg-cvslog] rtpdec: Initialize some variables to silence compiler warnings

Martin Storsjö git at videolan.org
Sun Mar 3 11:51:48 CET 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat Mar  2 13:54:50 2013 +0200| [8fbab7a6c84fd75de4f752b412cea8032604f75b] | committer: Martin Storsjö

rtpdec: Initialize some variables to silence compiler warnings

The warnings are false positives, older gcc versions (such as 4.5)
think the variables can be used uninitialized while they in
practice can't, while newer (4.6) gets it right.

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

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

 libavformat/rtpdec.c     |    2 +-
 libavformat/rtpdec_vp8.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 145d7c8..f734b91 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -424,7 +424,7 @@ int ff_rtp_send_rtcp_feedback(RTPDemuxContext *s, URLContext *fd,
     AVIOContext *pb;
     uint8_t *buf;
     int64_t now;
-    uint16_t first_missing, missing_mask;
+    uint16_t first_missing = 0, missing_mask = 0;
 
     if (!fd && !avio)
         return -1;
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index 3db61c1..fc86ac1 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -82,7 +82,7 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8,
         keyidx_present = 0;
     int pictureid = -1, pictureid_mask = 0;
     int returned_old_frame = 0;
-    uint32_t old_timestamp;
+    uint32_t old_timestamp = 0;
 
     if (!buf) {
         if (vp8->data) {



More information about the ffmpeg-cvslog mailing list