diff options
author | James Zern <jzern@google.com> | 2020-05-06 13:01:57 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2020-05-07 17:15:42 -0700 |
commit | cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b (patch) | |
tree | 6ef2a68989652cc9eaf7d451ce21fccb87b5c684 /examples/vp9cx_set_ref.c | |
parent | b130f71bf0c9eb0911fc27b17fc543366ceffc3e (diff) | |
download | libvpx-cbc276a3d4e3ff91d155e6f0d66f9033cec8b32b.tar.gz |
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/vp9cx_set_ref.c')
-rw-r--r-- | examples/vp9cx_set_ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/vp9cx_set_ref.c b/examples/vp9cx_set_ref.c index 911ad3863..1a0823153 100644 --- a/examples/vp9cx_set_ref.c +++ b/examples/vp9cx_set_ref.c @@ -251,7 +251,7 @@ int main(int argc, char **argv) { die("Failed to open %s for reading.", infile_arg); if (vpx_codec_enc_init(&ecodec, encoder->codec_interface(), &cfg, 0)) - die_codec(&ecodec, "Failed to initialize encoder"); + die("Failed to initialize encoder"); // Disable alt_ref. if (vpx_codec_control(&ecodec, VP8E_SET_ENABLEAUTOALTREF, 0)) |