avcodec/lagarith: Check scale_factor