avcodec/smc: Check input packet size