diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-09-01 20:06:05 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2011-09-01 20:23:40 +0200 |
commit | 3dd2c8bbbc725bb596eca879908881d252114243 (patch) | |
tree | a3ad8514fe2cf412f2506ccc1c550d3372bd6ade /libavformat/wav.c | |
parent | 0baf651bc12d256cf71ae94d6219e65c9b0d3e5a (diff) | |
download | ffmpeg-3dd2c8bbbc725bb596eca879908881d252114243.tar.gz |
wav: init st to NULL to avoid a false-positive warning.
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r-- | libavformat/wav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index 1ae9413aed..327d8917b8 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -387,7 +387,7 @@ static int wav_read_header(AVFormatContext *s, int rf64; unsigned int tag; AVIOContext *pb = s->pb; - AVStream *st; + AVStream *st = NULL; WAVContext *wav = s->priv_data; int ret, got_fmt = 0; int64_t next_tag_ofs, data_ofs = -1; |