avcodec/tiffenc: properly compute packet size