decoder: do the picture pool cancel in the decoder thread
Doing it too early may indicate to the decoder we don't want to decode anymore.
It may cancel the benefit of doing it in the input thread. It was originally unblocking the decoder thread that might be waiting on a picture. At the expense of getting an error.
Fixes #26915 (closed)