avcodec/anm: Check input size for a frame with just a stop code