[FFmpeg-devel] [PATCH] tests/api: Silence a few uninitialized variables warnings

Timothy Gu timothygu99 at gmail.com
Mon Feb 29 04:23:40 CET 2016


---
 tests/api/api-flac-test.c | 2 +-
 tests/api/api-seek-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c
index 7b48059..288bc2c 100644
--- a/tests/api/api-flac-test.c
+++ b/tests/api/api-flac-test.c
@@ -115,7 +115,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
     int result = 0;
     int got_output = 0;
     int i = 0;
-    int in_frame_bytes, out_frame_bytes;
+    int in_frame_bytes = 0, out_frame_bytes = 0;
 
     in_frame = av_frame_alloc();
     if (!in_frame) {
diff --git a/tests/api/api-seek-test.c b/tests/api/api-seek-test.c
index 135b972..5b655d8 100644
--- a/tests/api/api-seek-test.c
+++ b/tests/api/api-seek-test.c
@@ -179,7 +179,7 @@ static int seek_test(const char *input_filename, const char *start, const char *
     AVFormatContext *fmt_ctx = NULL;
     int video_stream;
     int result;
-    int i, j;
+    int i = 0, j = 0;
     long int start_ts, end_ts;
 
     size_of_array = 0;
-- 
1.9.1



More information about the ffmpeg-devel mailing list