avcodec/ffv1dec_template: Check for the end of input after 1024 pixels