[FFmpeg-devel] [PATCH 3/3] Fix various uninitialized variable warnings
Clément Bœsch
ubitux at gmail.com
Sun May 29 21:07:36 CEST 2011
---
ffplay.c | 2 +-
libavformat/iff.c | 2 +-
libavformat/matroskadec.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index ffe1c0f..1ac83a6 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1740,7 +1740,7 @@ static int video_thread(void *arg)
{
VideoState *is = arg;
AVFrame *frame= avcodec_alloc_frame();
- int64_t pts_int, pos;
+ int64_t pts_int = 0, pos = 0;
double pts;
int ret;
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 2dd1ef7..6815f8a 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -309,7 +309,7 @@ static int iff_read_packet(AVFormatContext *s,
IffDemuxContext *iff = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st = s->streams[0];
- int ret;
+ int ret = 0;
if(iff->sent_bytes >= iff->body_size)
return AVERROR(EIO);
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 569b95f..031e89a 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1037,7 +1037,8 @@ static void matroska_fix_ass_packet(MatroskaDemuxContext *matroska,
char *line, *layer, *ptr = pkt->data, *end = ptr+pkt->size;
for (; *ptr!=',' && ptr<end-1; ptr++);
if (*ptr == ',')
- layer = ++ptr;
+ ptr++;
+ layer = ptr;
for (; *ptr!=',' && ptr<end-1; ptr++);
if (*ptr == ',') {
int64_t end_pts = pkt->pts + display_duration;
--
1.7.5.2
More information about the ffmpeg-devel
mailing list