changeset 9424:cb73e3273191 libavcodec

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)
author bcoudurier
date Mon, 13 Apr 2009 03:29:19 +0000
parents b3be9818cf2f
children 1ff6eb1d7d14
files h264_parser.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264_parser.c	Sun Apr 12 22:48:44 2009 +0000
+++ b/h264_parser.c	Mon Apr 13 03:29:19 2009 +0000
@@ -114,7 +114,7 @@
     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 */