On destruction, MojoVideoDecoder synchronously aborts outstanding |init_cb| and |decode_cb| callbacks. In some cases, this causes DecoderSelector to attempt to dereference null scoped_refptrs.
There are two steps to fix this properly:
1. Decide on and document the correct handling of outstanding callbacks on the VideoDecoder interface.
I recommend that the contact not require outstanding callbacks to be called, and further that we should explicitly disallow synchronous calls from the destructor. We may wish to go further and disallow synchronous calls at all (in which case a task runner should be passed in).
2. Update implementations and clients of the API.
Comment 1 by sande...@chromium.org
, May 11 2017