summaryrefslogtreecommitdiff
path: root/examples/simple_encoder.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-09-19 19:01:21 -0700
committerJames Zern <jzern@google.com>2016-09-19 19:02:49 -0700
commit08b8b6bb8f09b616c2e8c910c181d34fbf6b0970 (patch)
tree7ed57c831f361d22c970a7438db5bfb65e0e50e0 /examples/simple_encoder.c
parent0695843a216dd63e8ac087e13c44de81e8a50afe (diff)
downloadlibvpx-08b8b6bb8f09b616c2e8c910c181d34fbf6b0970.tar.gz
libvpx-08b8b6bb8f09b616c2e8c910c181d34fbf6b0970.tar.bz2
libvpx-08b8b6bb8f09b616c2e8c910c181d34fbf6b0970.zip
examples: quiet -Wshorten-64-to-32 warnings
all around usage of strtol/strtoul Change-Id: If907c89f107a068987aa71ddd93cee9a7389e4cd
Diffstat (limited to 'examples/simple_encoder.c')
-rw-r--r--examples/simple_encoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c
index 8632f179b..dde6344f8 100644
--- a/examples/simple_encoder.c
+++ b/examples/simple_encoder.c
@@ -175,14 +175,14 @@ int main(int argc, char **argv) {
infile_arg = argv[4];
outfile_arg = argv[5];
keyframe_interval_arg = argv[6];
- max_frames = strtol(argv[8], NULL, 0);
+ max_frames = (int)strtol(argv[8], NULL, 0);
encoder = get_vpx_encoder_by_name(codec_arg);
if (!encoder) die("Unsupported codec.");
info.codec_fourcc = encoder->fourcc;
- info.frame_width = strtol(width_arg, NULL, 0);
- info.frame_height = strtol(height_arg, NULL, 0);
+ info.frame_width = (int)strtol(width_arg, NULL, 0);
+ info.frame_height = (int)strtol(height_arg, NULL, 0);
info.time_base.numerator = 1;
info.time_base.denominator = fps;
@@ -196,7 +196,7 @@ int main(int argc, char **argv) {
die("Failed to allocate image.");
}
- keyframe_interval = strtol(keyframe_interval_arg, NULL, 0);
+ keyframe_interval = (int)strtol(keyframe_interval_arg, NULL, 0);
if (keyframe_interval < 0) die("Invalid keyframe interval value.");
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
@@ -209,7 +209,7 @@ int main(int argc, char **argv) {
cfg.g_timebase.num = info.time_base.numerator;
cfg.g_timebase.den = info.time_base.denominator;
cfg.rc_target_bitrate = bitrate;
- cfg.g_error_resilient = strtol(argv[7], NULL, 0);
+ cfg.g_error_resilient = (vpx_codec_er_flags_t)strtoul(argv[7], NULL, 0);
writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
if (!writer) die("Failed to open %s for writing.", outfile_arg);