ref: 339391a8d4f6ef6c929323b54822acb9edda724e
parent: 116aa2db6ceac25690b4214e427baa728649d1e1
author: Jim Bankoski <[email protected]>
date: Thu Aug 21 03:20:41 EDT 2014
vpx_temporal_svc_encoder: initialize outfile to avoid warning Change-Id: I53077092342bc35fd783e1b7dcb80b21677f11c1
--- a/examples/vpx_temporal_svc_encoder.c
+++ b/examples/vpx_temporal_svc_encoder.c
@@ -12,6 +12,7 @@
// encoding scheme based on temporal scalability for video applications
// that benefit from a scalable bitstream.
+#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -438,7 +439,7 @@
}
int main(int argc, char **argv) {
- VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS];
+ VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
vpx_codec_ctx_t codec;
vpx_codec_enc_cfg_t cfg;
int frame_cnt = 0;
@@ -569,6 +570,8 @@
outfile[i] = vpx_video_writer_open(file_name, kContainerIVF, &info);
if (!outfile[i])
die("Failed to open %s for writing", file_name);
+
+ assert(outfile[i] != NULL);
}
// No spatial layers in this encoder.
cfg.ss_number_layers = 1;