hwcodec: fix shrink_callback resuming playback wrongly, and add checks