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
This commit is contained in:
James Zern
2020-05-06 13:01:57 -07:00
parent b130f71bf0
commit cbc276a3d4
10 changed files with 12 additions and 12 deletions

View File

@@ -106,7 +106,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;