lavf: sanity check size in av_get/append_packet().