Use AV_R/WN32 instead of direct integer copying.