[FFmpeg-devel] [PATCH] ffmpeg.c: Initializing uninitialized variables

Chiranjeevi Melam cmelam at rgbnetworks.com
Wed Aug 31 17:25:07 CEST 2011

Initializing uninitialized variables and assigning NULL pointer   in ffmpeg.c

diff --git a/ffmpeg/ffmpeg_orig.c b/ffmpeg/ffmpeg_new.c
index 95b3252..31b981f 100755
--- a/ffmpeg/ffmpeg_orig.c
+++ b/ffmpeg/ffmpeg_new.c
@@ -241,9 +241,10 @@ static float dts_delta_threshold = 10;

 static int64_t timer_start;

-static uint8_t *audio_buf;
-static uint8_t *audio_out;
-static unsigned int allocated_audio_out_size, allocated_audio_buf_size;
+static uint8_t *audio_buf = NULL;
+static uint8_t *audio_out = NULL;
+static unsigned int allocated_audio_out_size = 0;
+static unsigned int allocated_audio_buf_size = 0;

 static short *samples;

More information about the ffmpeg-devel mailing list