See summary.
38385c5f834eb8f1616d9992de97504518da12c9 * The new code in dispose should never be hit. the AsyncResult will have a ref on the codec offer. * When getting cancelled, please unregister the object from the bus right away. To be sure you don't get accept or reject called afterwards e89cf68b0c247ac2974560be771b35a5ccdca44c * You're leaking the cancellable when switching offers * In general it's not guaranteed that if you cancel an async function the result will be an error. So check earlier whether it was an old or a new offer. 88bd1dc580f15585dc6bacb64be336c27f9762ac Implementing it like this will fuck up your refounting if you switch codec offers while deinitting. Imagine the following sequence: * A codec offer is started * A new one is started, the old one gets cancelled * the stream gets deinitialized. the last codec offer gets cancelled as well, so there are now two cancelled operations that haven't returned just yet. _finished_cb will get called twice, dropping the last ref the first time and using a disposed object the second time... Also when calling deinit on the contact it should make itself drop of the bus asap and also make its streams do the same.
Updated my branch per your review comments.
Your refcounting it still potentially racy. Although in practise it works as the older offers cancellation will come through first. A slightly more elegant solution would be appreciated though
Updated the branch per your review comments.
Looks fine, merging
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.