examples/decoding_encoding: add missing checks on avcodec_alloc_context3()