summaryrefslogtreecommitdiff
path: root/examples/simple_decoder.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2020-05-06 13:01:57 -0700
committerJames Zern <jzern@google.com>2020-05-07 17:15:42 -0700
commitcbc276a3d4e3ff91d155e6f0d66f9033cec8b32b (patch)
tree6ef2a68989652cc9eaf7d451ce21fccb87b5c684 /examples/simple_decoder.c
parentb130f71bf0c9eb0911fc27b17fc543366ceffc3e (diff)
downloadlibvpx-cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b.tar
libvpx-cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b.tar.gz
libvpx-cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b.tar.bz2
libvpx-cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b.zip
examples: use die() on dec/enc_init() failure
rather than die_codec(). calling any api functions with an uninitialized codec context is undefined. this avoids a crash in a call to vpx_codec_error_detail(). BUG=webm:1688 Change-Id: I4a4feeabc1cafa44c8d2f24587fad79e313dba6d
Diffstat (limited to 'examples/simple_decoder.c')
-rw-r--r--examples/simple_decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/simple_decoder.c b/examples/simple_decoder.c
index 2bb1a0524..d089e826d 100644
--- a/examples/simple_decoder.c
+++ b/examples/simple_decoder.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv) {
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
- die_codec(&codec, "Failed to initialize decoder.");
+ die("Failed to initialize decoder.");
while (vpx_video_reader_read_frame(reader)) {
vpx_codec_iter_t iter = NULL;