aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-04-13 03:29:19 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-04-13 03:29:19 +0000
commit8fa0ae060b759d00c8d8f4070b36c16b3dbf0d8a (patch)
treebba2fd32abe6785cfb642bbe50a01f09fe5280cb /libavcodec/h264_parser.c
parentcc3a2486037e289b0095aa020102fcae19efa144 (diff)
downloadffmpeg-8fa0ae060b759d00c8d8f4070b36c16b3dbf0d8a.tar.gz
Init state to -1 in h264 parser.
Fix: ==22063== Conditional jump or move depends on uninitialised value(s) ==22063== at 0x811A4B7: ff_find_start_code (mpegvideo.c:99) ==22063== by 0x82F5B74: parse_nal_units (h264_parser.c:132) ==22063== by 0x82F5A68: h264_parse (h264_parser.c:261) [...] ==22063== Uninitialised value was created by a stack allocation ==22063== at 0x82F5AF5: parse_nal_units (h264_parser.c:112) Originally committed as revision 18479 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 27f68d2380..dabd475f93 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -114,7 +114,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
const uint8_t *buf_end = buf + buf_size;
unsigned int pps_id;
unsigned int slice_type;
- int state;
+ int state = -1;
const uint8_t *ptr;
/* set some sane default values */