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
aom_codec_error_detail().
c.f., https://crbug.com/webm/1688
Change-Id: I4a4feeabc1cafa44c8d2f24587fad79e313dba6d
diff --git a/examples/lossless_encoder.c b/examples/lossless_encoder.c
index 7c57278..1971b9c 100644
--- a/examples/lossless_encoder.c
+++ b/examples/lossless_encoder.c
@@ -110,7 +110,7 @@
die("Failed to open %s for reading.", argv[3]);
if (aom_codec_enc_init(&codec, encoder, &cfg, 0))
- die_codec(&codec, "Failed to initialize encoder");
+ die("Failed to initialize encoder");
if (AOM_CODEC_CONTROL_TYPECHECKED(&codec, AV1E_SET_LOSSLESS, 1))
die_codec(&codec, "Failed to use lossless mode");