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
Showing the changes to examples/simple_decoder.c (1 of 10 files). Show all
Unified · Split
| @@ -118,7 +118,7 @@ int main(int argc, char **argv) { · 117 unmodified lines | ||
| 118 | 118 | printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); |
| 119 | 119 | |
| 120 | 120 | 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."); | |
| 122 | 122 | |
| 123 | 123 | while (vpx_video_reader_read_frame(reader)) { |
| 124 | 124 | vpx_codec_iter_t iter = NULL; |