avcodec/avpacket: Fix off by 5 error