History

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

James Zern committed 6 years ago

Commit cbc276a1 parent b130f7110 files · +12 −12Browse files

Showing the changes to examples/simple_decoder.c (1 of 10 files). Show all

Unified · Split

examples/simple_decoder.c+1−1
@@ -118,7 +118,7 @@ int main(int argc, char **argv) { · 117 unmodified lines
118118 printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
119119
120120 if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
121− die_codec(&codec, "Failed to initialize decoder.");
121+ die("Failed to initialize decoder.");
122122
123123 while (vpx_video_reader_read_frame(reader)) {
124124 vpx_codec_iter_t iter = NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t